[Piuparts-commits] [piuparts] 01/01: custom-scripts: fix bashism

Holger Levsen holger at moszumanska.debian.org
Sat May 31 22:45:26 UTC 2014


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch develop
in repository piuparts.

commit 6d6370f4fcd6a13f8fbefe00a38de010a774b900
Author: Holger Levsen <holger at layer-acht.org>
Date:   Sun Jun 1 00:45:22 2014 +0200

    custom-scripts: fix bashism
---
 custom-scripts/scripts/post_purge_exceptions | 13 ++++++++-----
 custom-scripts/scripts/pre_remove_exceptions | 13 ++++++++-----
 2 files changed, 16 insertions(+), 10 deletions(-)

diff --git a/custom-scripts/scripts/post_purge_exceptions b/custom-scripts/scripts/post_purge_exceptions
index 9eb167c..6dedeed 100755
--- a/custom-scripts/scripts/post_purge_exceptions
+++ b/custom-scripts/scripts/post_purge_exceptions
@@ -48,10 +48,13 @@ case ${PIUPARTS_OBJECTS%%=*} in
 	gdm3|gnome-session|gnome-shell*|gnome-core|gnome|gnome-desktop-environment|task-gnome-desktop|razorqt|sucrose-0.96|xfswitch-plugin|mate-core|mate-desktop-environment*|task-kde-desktop)
 		# see pre_remove_exceptions for why this is needed
 		log_debug
-		if [ "${PIUPARTS_DISTRIBUTION:0:5}" != "lenny" ] && [ "${PIUPARTS_DISTRIBUTION:0:7}" != "squeeze" ] && [ "${PIUPARTS_DISTRIBUTION:0:6}" != "wheezy" ] ; then
-			dpkg --purge systemd-shim
-		else
-			echo "PIUPARTS_DISTRIBUTION=$PIUPARTS_DISTRIBUTION, not applying systemd-sysv removal workaround"
-		fi
+		case ${PIUPARTS_DISTRIBUTION} in
+			lenny*|squeeze*|wheezy)
+				echo "PIUPARTS_DISTRIBUTION=$PIUPARTS_DISTRIBUTION, not applying systemd-sysv removal workaround"
+				;;
+			*)
+				dpkg --purge systemd-shim
+				;;
+		esac
 		;;
 esac
diff --git a/custom-scripts/scripts/pre_remove_exceptions b/custom-scripts/scripts/pre_remove_exceptions
index 3c12848..f316a12 100755
--- a/custom-scripts/scripts/pre_remove_exceptions
+++ b/custom-scripts/scripts/pre_remove_exceptions
@@ -26,11 +26,14 @@ case ${PIUPARTS_OBJECTS%%=*} in
 		# these packages cause installation of systemd-sysv which (currently) needs this help for removing it again
 		# also see post_purge_exceptions for further cleanup
 		log_debug
-		if [ "${PIUPARTS_DISTRIBUTION:0:5}" != "lenny" ] && [ "${PIUPARTS_DISTRIBUTION:0:7}" != "squeeze" ] && [ "${PIUPARTS_DISTRIBUTION:0:6}" != "wheezy" ] ; then
-			apt-get -y install sysvinit-core
-		else
-			echo "PIUPARTS_DISTRIBUTION=$PIUPARTS_DISTRIBUTION, not applying systemd-sysv removal workaround"
-		fi
+		case ${PIUPARTS_DISTRIBUTION} in
+			lenny*|squeeze*|wheezy)
+				echo "PIUPARTS_DISTRIBUTION=$PIUPARTS_DISTRIBUTION, not applying systemd-sysv removal workaround"
+				;;
+			*)
+				apt-get -y install sysvinit-core
+				;;
+		esac
 		;;
 esac
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/piuparts/piuparts.git



More information about the Piuparts-commits mailing list