diff options
author | joey <joey> | 2002-06-21 00:46:43 +0000 |
---|---|---|
committer | joey <joey> | 2002-06-21 00:46:43 +0000 |
commit | c84545b9234bf1d233983d5ae59ab59d573a5460 (patch) | |
tree | 08b66dfc30003e1ec9afeab75aa2848fb786bb8b /autoscripts | |
parent | 3c36c2532c3907f0a315d9010654176e8e9fc319 (diff) | |
download | debhelper-c84545b9234bf1d233983d5ae59ab59d573a5460.tar.gz |
r533: * In script fragments, use more posix tests, no -a or -o, no parens.
Closes: #150403
Diffstat (limited to 'autoscripts')
-rw-r--r-- | autoscripts/postinst-doc | 2 | ||||
-rw-r--r-- | autoscripts/postinst-emacsen | 2 | ||||
-rw-r--r-- | autoscripts/postinst-menu | 2 | ||||
-rw-r--r-- | autoscripts/postinst-menu-method | 2 | ||||
-rw-r--r-- | autoscripts/postinst-mime | 2 | ||||
-rw-r--r-- | autoscripts/postinst-modules | 2 | ||||
-rw-r--r-- | autoscripts/postrm-debconf | 2 | ||||
-rw-r--r-- | autoscripts/postrm-menu-method | 2 | ||||
-rw-r--r-- | autoscripts/postrm-suid | 2 | ||||
-rw-r--r-- | autoscripts/postrm-xfonts | 2 | ||||
-rw-r--r-- | autoscripts/prerm-doc | 3 | ||||
-rw-r--r-- | autoscripts/prerm-init-norestart | 2 | ||||
-rw-r--r-- | autoscripts/prerm-init-norestart-invoke | 2 |
13 files changed, 14 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 |