diff options
author | joey <joey> | 2002-05-26 05:06:51 +0000 |
---|---|---|
committer | joey <joey> | 2002-05-26 05:06:51 +0000 |
commit | 4106beebd28b7fe73dd19e43cf15378c08b8241f (patch) | |
tree | a2b42f4eefb46e7b3ae27ab09d115f1093fa6103 | |
parent | 9dc5e9ccba3756ad14d7c2941c3130243bbc4406 (diff) | |
download | debhelper-4106beebd28b7fe73dd19e43cf15378c08b8241f.tar.gz |
r528: * Consistently use the which command instead of command -v or hardcoded
paths in autoscripts. Neither is in posix, but which is in debianutils, so
will always be available. command -v is not available in zsh.
Closes: #148172
-rw-r--r-- | autoscripts/postinst-doc-base | 2 | ||||
-rw-r--r-- | autoscripts/postinst-suid | 2 | ||||
-rw-r--r-- | autoscripts/postinst-xaw | 4 | ||||
-rw-r--r-- | autoscripts/postinst-xfonts | 2 | ||||
-rw-r--r-- | autoscripts/postrm-menu | 2 | ||||
-rw-r--r-- | autoscripts/postrm-menu-method | 2 | ||||
-rw-r--r-- | autoscripts/postrm-mime | 2 | ||||
-rw-r--r-- | autoscripts/postrm-suid | 2 | ||||
-rw-r--r-- | autoscripts/postrm-xaw | 4 | ||||
-rw-r--r-- | autoscripts/prerm-doc-base | 2 | ||||
-rw-r--r-- | debian/changelog | 9 |
11 files changed, 21 insertions, 12 deletions
diff --git a/autoscripts/postinst-doc-base b/autoscripts/postinst-doc-base index fce4d17e..39265721 100644 --- a/autoscripts/postinst-doc-base +++ b/autoscripts/postinst-doc-base @@ -1,3 +1,3 @@ -if [ "$1" = configure ] && command -v install-docs >/dev/null 2>&1; then +if [ "$1" = configure ] && which install-docs >/dev/null 2>&1; then install-docs -i /usr/share/doc-base/#DOC-ID# fi diff --git a/autoscripts/postinst-suid b/autoscripts/postinst-suid index 820d69a4..d0d16c06 100644 --- a/autoscripts/postinst-suid +++ b/autoscripts/postinst-suid @@ -1,5 +1,5 @@ if [ "$1" = "configure" ]; then - if command -v suidregister >/dev/null 2>&1 && [ -e /etc/suid.conf ]; then + if which suidregister >/dev/null 2>&1 && [ -e /etc/suid.conf ]; then suidregister -s #PACKAGE# /#FILE# #OWNER# #GROUP# #PERMS# elif [ -e /#FILE# ]; then chown #OWNER#.#GROUP# /#FILE# diff --git a/autoscripts/postinst-xaw b/autoscripts/postinst-xaw index 035aa269..f7703dcf 100644 --- a/autoscripts/postinst-xaw +++ b/autoscripts/postinst-xaw @@ -1,6 +1,6 @@ if [ "$1" = "configure" ]; then - if [ -x /usr/sbin/update-xaw-wrappers ]; then - /usr/sbin/update-xaw-wrappers + if which update-xaw-wrappers >/dev/null 2>&1; then + update-xaw-wrappers fi for opts in #OPTS#; do update-alternatives --quiet --install $opts 25 diff --git a/autoscripts/postinst-xfonts b/autoscripts/postinst-xfonts index 4c5ab1b8..96390e4e 100644 --- a/autoscripts/postinst-xfonts +++ b/autoscripts/postinst-xfonts @@ -1,3 +1,3 @@ -if [ -x /usr/sbin/update-fonts-dir ]; then +if which update-fonts-dir >/dev/null 2>&1; then #CMDS# fi diff --git a/autoscripts/postrm-menu b/autoscripts/postrm-menu index a34b6f18..a180558d 100644 --- a/autoscripts/postrm-menu +++ b/autoscripts/postrm-menu @@ -1 +1 @@ -if [ -x /usr/bin/update-menus ]; then update-menus ; fi +if [ -x "`which update-menus 2>/dev/null`" ]; then update-menus ; fi diff --git a/autoscripts/postrm-menu-method b/autoscripts/postrm-menu-method index 2e0faed7..0d573fd0 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 [ -x /usr/bin/update-menus ]; then update-menus; fi +if [ -x "`which update-menus 2>/dev/null`" ]; then update-menus ; fi diff --git a/autoscripts/postrm-mime b/autoscripts/postrm-mime index e993233b..a9404112 100644 --- a/autoscripts/postrm-mime +++ b/autoscripts/postrm-mime @@ -1 +1 @@ -if [ -x /usr/sbin/update-mime ]; then update-mime; fi +if which update-mime >/dev/null 2>&1; then update-mime; fi diff --git a/autoscripts/postrm-suid b/autoscripts/postrm-suid index 340736af..46fee33e 100644 --- a/autoscripts/postrm-suid +++ b/autoscripts/postrm-suid @@ -1,4 +1,4 @@ if [ "$1" = remove -a -e /etc/suid.conf ] && \ - command -v suidunregister >/dev/null 2>&1; then + which suidunregister >/dev/null 2>&1; then suidunregister -s #PACKAGE# /#FILE# fi diff --git a/autoscripts/postrm-xaw b/autoscripts/postrm-xaw index 14d13ebb..61bd3c9f 100644 --- a/autoscripts/postrm-xaw +++ b/autoscripts/postrm-xaw @@ -1,3 +1,3 @@ -if [ -x /usr/sbin/update-xaw-wrappers ]; then - /usr/sbin/update-xaw-wrappers +if which update-xaw-wrappers >/dev/null 2>&1; then + update-xaw-wrappers fi diff --git a/autoscripts/prerm-doc-base b/autoscripts/prerm-doc-base index d2b07ebc..7ec95b7c 100644 --- a/autoscripts/prerm-doc-base +++ b/autoscripts/prerm-doc-base @@ -1,4 +1,4 @@ if [ "$1" = remove -o "$1" = upgrade ] && \ - command -v install-docs >/dev/null 2>&1; then + which install-docs >/dev/null 2>&1; then install-docs -r #DOC-ID# fi diff --git a/debian/changelog b/debian/changelog index 3bc66f6c..c4b0239f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +debhelper (4.0.10) unstable; urgency=low + + * Consistently use the which command instead of command -v or hardcoded + paths in autoscripts. Neither is in posix, but which is in debianutils, so + will always be available. command -v is not available in zsh. + Closes: #148172 + + -- Joey Hess <joeyh@debian.org> Sun, 26 May 2002 00:54:33 -0400 + debhelper (4.0.9) unstable; urgency=low * dh_install: glob relative to --sourcedir. Closes: #147908 |