| 1 |
#! /bin/sh -e |
| 2 |
|
| 3 |
case "$1" in |
| 4 |
failed-upgrade|abort-upgrade) |
| 5 |
# do nothing |
| 6 |
;; |
| 7 |
|
| 8 |
abort-install) |
| 9 |
# do nothing |
| 10 |
;; |
| 11 |
|
| 12 |
purge) |
| 13 |
##purge game files |
| 14 |
if [ -d /var/games/crossfire/ ] ; then |
| 15 |
if [ "`ls /var/games/crossfire/ | wc -l`" -gt 0 ] ; then |
| 16 |
echo "purging /var/games/crossfire/ and its contents" |
| 17 |
rm -rf /var/games/crossfire/ ||true |
| 18 |
fi |
| 19 |
fi |
| 20 |
##purge logfiles |
| 21 |
if [ -d /var/log/crossfire/ ] ; then |
| 22 |
if [ "`ls /var/log/crossfire/ | wc -l`" -gt 0 ] ; then |
| 23 |
echo "purging /var/games/crossfire/ and its contents" |
| 24 |
rm -rf /var/log/crossfire/ ||true |
| 25 |
fi |
| 26 |
fi |
| 27 |
;; |
| 28 |
|
| 29 |
remove|upgrade|disappear) |
| 30 |
# do nothing |
| 31 |
;; |
| 32 |
*) |
| 33 |
echo "$0: incorrect arguments: $*" >&2 |
| 34 |
exit 1 |
| 35 |
;; |
| 36 |
|
| 37 |
esac |
| 38 |
|
| 39 |
##DEBHELPER## |
| 40 |
|