From c84545b9234bf1d233983d5ae59ab59d573a5460 Mon Sep 17 00:00:00 2001 From: joey Date: Fri, 21 Jun 2002 00:46:43 +0000 Subject: r533: * In script fragments, use more posix tests, no -a or -o, no parens. Closes: #150403 --- autoscripts/postinst-doc | 2 +- autoscripts/postinst-emacsen | 2 +- autoscripts/postinst-menu | 2 +- autoscripts/postinst-menu-method | 2 +- autoscripts/postinst-mime | 2 +- autoscripts/postinst-modules | 2 +- autoscripts/postrm-debconf | 2 +- autoscripts/postrm-menu-method | 2 +- autoscripts/postrm-suid | 2 +- autoscripts/postrm-xfonts | 2 +- autoscripts/prerm-doc | 3 ++- autoscripts/prerm-init-norestart | 2 +- autoscripts/prerm-init-norestart-invoke | 2 +- debian/changelog | 7 +++++++ 14 files changed, 21 insertions(+), 13 deletions(-) diff --git a/autoscripts/postinst-doc b/autoscripts/postinst-doc index a4b000ba..a49f4ca4 100644 --- a/autoscripts/postinst-doc +++ b/autoscripts/postinst-doc @@ -1,5 +1,5 @@ if [ "$1" = "configure" ]; then - if [ -d /usr/doc -a ! -e /usr/doc/#PACKAGE# -a -d /usr/share/doc/#PACKAGE# ]; then + if [ -d /usr/doc ] && [ ! -e /usr/doc/#PACKAGE# ] && [ -d /usr/share/doc/#PACKAGE# ]; then ln -sf ../share/doc/#PACKAGE# /usr/doc/#PACKAGE# fi fi diff --git a/autoscripts/postinst-emacsen b/autoscripts/postinst-emacsen index 97004eb7..f80e1dbd 100644 --- a/autoscripts/postinst-emacsen +++ b/autoscripts/postinst-emacsen @@ -1,4 +1,4 @@ -if [ "$1" = "configure" -a -x /usr/lib/emacsen-common/emacs-package-install ] +if [ "$1" = "configure" ] && [ -x /usr/lib/emacsen-common/emacs-package-install ] then /usr/lib/emacsen-common/emacs-package-install #PACKAGE# fi diff --git a/autoscripts/postinst-menu b/autoscripts/postinst-menu index 8a46311f..276a3c0a 100644 --- a/autoscripts/postinst-menu +++ b/autoscripts/postinst-menu @@ -1 +1 @@ -if [ "$1" = "configure" -a -x /usr/bin/update-menus ]; then update-menus ; fi +if [ "$1" = "configure" ] && [ -x /usr/bin/update-menus ]; then update-menus ; fi diff --git a/autoscripts/postinst-menu-method b/autoscripts/postinst-menu-method index 0ea7959b..01913d82 100644 --- a/autoscripts/postinst-menu-method +++ b/autoscripts/postinst-menu-method @@ -1,5 +1,5 @@ inst=/etc/menu-methods/#PACKAGE# -if [ -x /usr/bin/update-menus -a -f $inst -a -x /usr/sbin/install-menu ] ; then +if [ -x /usr/bin/update-menus ] && [ -f $inst ] ; then chmod a+x $inst update-menus fi diff --git a/autoscripts/postinst-mime b/autoscripts/postinst-mime index a28e5bd7..bef63cc9 100644 --- a/autoscripts/postinst-mime +++ b/autoscripts/postinst-mime @@ -1 +1 @@ -if [ "$1" = "configure" -a -x /usr/sbin/update-mime ]; then update-mime; fi +if [ "$1" = "configure" ] && [ -x /usr/sbin/update-mime ]; then update-mime; fi diff --git a/autoscripts/postinst-modules b/autoscripts/postinst-modules index b25a1c13..bcd7c34b 100644 --- a/autoscripts/postinst-modules +++ b/autoscripts/postinst-modules @@ -1,3 +1,3 @@ -if [ "$1" = "configure" -a -x /sbin/update-modules ]; then +if [ "$1" = "configure" ] && [ -x /sbin/update-modules ]; then update-modules fi diff --git a/autoscripts/postrm-debconf b/autoscripts/postrm-debconf index a0a63b31..5a61724d 100644 --- a/autoscripts/postrm-debconf +++ b/autoscripts/postrm-debconf @@ -1,4 +1,4 @@ -if [ "$1" = purge -a -e /usr/share/debconf/confmodule ]; then +if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then . /usr/share/debconf/confmodule db_purge fi diff --git a/autoscripts/postrm-menu-method b/autoscripts/postrm-menu-method index 0d573fd0..ffa1e486 100644 --- a/autoscripts/postrm-menu-method +++ b/autoscripts/postrm-menu-method @@ -1,3 +1,3 @@ inst=/etc/menu-methods/#PACKAGE# -if [ "$1" = "remove" -a -f "$inst" ]; then chmod a-x $inst ; fi +if [ "$1" = "remove" ] && [ -f "$inst" ]; then chmod a-x $inst ; fi if [ -x "`which update-menus 2>/dev/null`" ]; then update-menus ; fi diff --git a/autoscripts/postrm-suid b/autoscripts/postrm-suid index 46fee33e..a4cfecf9 100644 --- a/autoscripts/postrm-suid +++ b/autoscripts/postrm-suid @@ -1,4 +1,4 @@ -if [ "$1" = remove -a -e /etc/suid.conf ] && \ +if [ "$1" = remove ] && [ -e /etc/suid.conf ] && \ which suidunregister >/dev/null 2>&1; then suidunregister -s #PACKAGE# /#FILE# fi diff --git a/autoscripts/postrm-xfonts b/autoscripts/postrm-xfonts index b5dd964b..a4d0a082 100644 --- a/autoscripts/postrm-xfonts +++ b/autoscripts/postrm-xfonts @@ -1,3 +1,3 @@ -if [ "$1" != "upgrade" -a -x /usr/sbin/update-fonts-dir ]; then +if [ "$1" != "upgrade" ] && [ -x /usr/sbin/update-fonts-dir ]; then #CMDS# fi diff --git a/autoscripts/prerm-doc b/autoscripts/prerm-doc index 5ae92d71..05abb495 100644 --- a/autoscripts/prerm-doc +++ b/autoscripts/prerm-doc @@ -1,3 +1,4 @@ -if [ \( "$1" = "upgrade" -o "$1" = "remove" \) -a -L /usr/doc/#PACKAGE# ]; then +if [ "$1" = "upgrade" ] || [ "$1" = "remove" ] && [ -L /usr/doc/#PACKAGE# +then rm -f /usr/doc/#PACKAGE# fi diff --git a/autoscripts/prerm-init-norestart b/autoscripts/prerm-init-norestart index b7e311d3..96fcea44 100644 --- a/autoscripts/prerm-init-norestart +++ b/autoscripts/prerm-init-norestart @@ -1,3 +1,3 @@ -if [ -x "/etc/init.d/#SCRIPT#" -a "$1" = remove ]; then +if [ -x "/etc/init.d/#SCRIPT#" ] && [ "$1" = remove ]; then /etc/init.d/#SCRIPT# stop fi diff --git a/autoscripts/prerm-init-norestart-invoke b/autoscripts/prerm-init-norestart-invoke index f04d45cf..b9414f07 100644 --- a/autoscripts/prerm-init-norestart-invoke +++ b/autoscripts/prerm-init-norestart-invoke @@ -1,3 +1,3 @@ -if [ -x "/etc/init.d/#SCRIPT#" -a "$1" = remove ]; then +if [ -x "/etc/init.d/#SCRIPT#" ] && [ "$1" = remove ]; then invoke-rc.d #SCRIPT# stop fi diff --git a/debian/changelog b/debian/changelog index b26894cc..221eb8cb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +debhelper (4.0.14) unstable; urgency=low + + * In script fragments, use more posix tests, no -a or -o, no parens. + Closes: #150403 + + -- Joey Hess Thu, 20 Jun 2002 20:39:55 -0400 + debhelper (4.0.13) unstable; urgency=low * Added --mainpackage= option, of use in some kernel modules packages. -- cgit v1.2.3