The core protocol of WoopChain
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
woop/scripts/package/deb/DEBIAN/prerm

30 lines
635 B

#!/bin/sh
set -e
before_remove() {
:
}
dummy() {
:
}
if [ "${1}" = "remove" -a -z "${2}" ]
then
# "before remove" goes here
before_remove
elif [ "${1}" = "upgrade" ]
then
# Executed before the old version is removed
# upon upgrade.
# We should generally not do anything here. The newly installed package
# should do the upgrade, not the uninstalled one, since it can't anticipate
# what new things it will have to do to upgrade for the new version.
dummy
elif echo "${1}" | grep -E -q "(fail|abort)"
then
echo "Failed to install before the pre-removal script was run." >&2
exit 1
fi