mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-12-08 23:03:46 +00:00
30 lines
850 B
Text
30 lines
850 B
Text
PRELOAD_STATE=/var/lib/preload/preload.state
|
|
|
|
# arg 1: the new package version
|
|
# arg 2: the old package version
|
|
pre_upgrade() {
|
|
if [ `vercmp $2 0.6.3-2` -lt 0 ]; then
|
|
echo "Backing up your state file..."
|
|
cp -af ${PRELOAD_STATE} ${PRELOAD_STATE}.backup
|
|
fi
|
|
}
|
|
|
|
# arg 1: the new package version
|
|
# arg 2: the old package version
|
|
post_upgrade() {
|
|
if [ `vercmp $2 0.6.3-2` -lt 0 -a -f ${PRELOAD_STATE}.backup ]; then
|
|
echo "Restoring the state file..."
|
|
mv -f ${PRELOAD_STATE}.backup ${PRELOAD_STATE}
|
|
fi
|
|
}
|
|
|
|
# arg 1: the old package version
|
|
post_remove() {
|
|
echo
|
|
echo "Leaving ${PRELOAD_STATE} intact in case one day you want to"
|
|
echo "install preload again. If you are sure you don't need it anymore, please"
|
|
echo "remove it manually. Log files in /var/log have not been removed as well."
|
|
echo
|
|
}
|
|
|
|
# vim:set ts=2 sw=2 et:
|