1
1
mirror of https://github.com/goreleaser/nfpm synced 2025-04-17 22:08:00 +02:00
nfpm/testdata/acceptance/scripts/preremove.sh

26 lines
408 B
Bash

#!/bin/sh
remove() {
printf "\033[32m Pre Remove of a normal remove\033[0m\n"
echo "Remove" > /tmp/preremove-proof
}
upgrade() {
printf "\033[32m Pre Remove of an upgrade\033[0m\n"
echo "Upgrade" > /tmp/preremove-proof
}
action="$1"
case "$action" in
"0" | "remove")
remove
;;
"1" | "upgrade")
upgrade
;;
*)
printf "\033[32m Alpine\033[0m"
remove
;;
esac