aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2017-08-01 23:47:30 -0700
committerBryan Newbold <bnewbold@robocracy.org>2017-08-02 00:09:46 -0700
commit2275400e1b96f5919cae8766f6fafd50b568feb6 (patch)
treeab183c793d7aabb286dbaf40b201b52bad30f1ca
parent9a823b8884886a2da8f711f5c29b019f8cceba23 (diff)
downloadscm-2275400e1b96f5919cae8766f6fafd50b568feb6.zip
scm-2275400e1b96f5919cae8766f6fafd50b568feb6.tar.gz
rewrite postrm and prerm with case syntax
-rw-r--r--debian/postrm13
-rw-r--r--debian/prerm10
2 files changed, 17 insertions, 6 deletions
diff --git a/debian/postrm b/debian/postrm
index 70022ef..24bd851 100644
--- a/debian/postrm
+++ b/debian/postrm
@@ -2,8 +2,15 @@
set -e
-if [ "$1" = purge ] && [ -e /usr/lib/scm/implcat ] && [ -e /usr/lib/scm/slibcat ]; then
- rm -f /usr/lib/scm/implcat /usr/lib/scm/slibcat
-fi
+case "$1" in
+ purge)
+ if [ -e /usr/lib/scm/implcat ]; then
+ rm -f /usr/lib/scm/implcat
+ fi
+ if [ -e /usr/lib/scm/slibcat ]; then
+ rm -f /usr/lib/scm/slibcat
+ fi
+ ;;
+esac
#DEBHELPER#
diff --git a/debian/prerm b/debian/prerm
index fc8719b..e58c8a0 100644
--- a/debian/prerm
+++ b/debian/prerm
@@ -2,8 +2,12 @@
set -e
-if [ \( "$1" = "upgrade" -o "$1" = "remove" \) -a -L /usr/doc/scm ]; then
- rm -f /usr/doc/scm
-fi
+case "$1" in
+ remove|upgrade)
+ # This is to ensure that "old" doc files (which might not be
+ # overwritten by new installs) get removed
+ rm -f /usr/doc/scm
+ ;;
+esac
#DEBHELPER#