]> git.donarmstrong.com Git - debhelper.git/commitdiff
r528: * Consistently use the which command instead of command -v or hardcoded
authorjoey <joey>
Sun, 26 May 2002 05:06:51 +0000 (05:06 +0000)
committerjoey <joey>
Sun, 26 May 2002 05:06:51 +0000 (05:06 +0000)
     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
autoscripts/postinst-doc-base
autoscripts/postinst-suid
autoscripts/postinst-xaw
autoscripts/postinst-xfonts
autoscripts/postrm-menu
autoscripts/postrm-menu-method
autoscripts/postrm-mime
autoscripts/postrm-suid
autoscripts/postrm-xaw
autoscripts/prerm-doc-base
debian/changelog

index fce4d17ead449181d93d2bc6b5333380836b49aa..39265721046586c56279466d69207afed7a9558f 100644 (file)
@@ -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
index 820d69a4ee221182cc9ce7af31ace441e1a1d4a9..d0d16c06d2763382e5b033fc1b98f9c7586bc519 100644 (file)
@@ -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#
index 035aa26935dad34aaff8b1962e25d2e845a56a68..f7703dcf44cc006f7f0b4988fa03efc98c6111bb 100644 (file)
@@ -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
index 4c5ab1b8f0d7d0d332815db3ee41534711a76376..96390e4e04ea162dc8fee6b20b89d11db38cede8 100644 (file)
@@ -1,3 +1,3 @@
-if [ -x /usr/sbin/update-fonts-dir ]; then
+if which update-fonts-dir >/dev/null 2>&1; then
        #CMDS#
 fi
index a34b6f188a157dcd128a8d71806cba6444b96e22..a180558d70b4c67f0429c422926c13691a72180c 100644 (file)
@@ -1 +1 @@
-if [ -x /usr/bin/update-menus ]; then update-menus ; fi
+if [ -x "`which update-menus 2>/dev/null`" ]; then update-menus ; fi
index 2e0faed72bb04a91a56a50f41ed2bb79d5f0dc7f..0d573fd0d16bba693ab66b058dbcadf0593ba7b4 100644 (file)
@@ -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
index e993233b2007d161d79cb6a675750597b1bfcd95..a9404112c55787ad7fac896e9b3d106d0d021142 100644 (file)
@@ -1 +1 @@
-if [ -x /usr/sbin/update-mime ]; then update-mime; fi
+if which update-mime >/dev/null 2>&1; then update-mime; fi
index 340736afa0db37da823283ecc3566f2e86818aa4..46fee33e16acde715f08d526969e58d9a32e5390 100644 (file)
@@ -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
index 14d13ebbbf29424eafb880981041f45161c10a77..61bd3c9f23dd7d44d910a62b6c904abf2a90c598 100644 (file)
@@ -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
index d2b07ebc05f3afafde5afe696d56f9567f079971..7ec95b7c2d0e21a5686464a827e402cabb4c29d4 100644 (file)
@@ -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
index 3bc66f6c450009e9ef8c027b4a7a29233c2c12f0..c4b0239f5a67ca1b64316d827efd2707b1e2f5e1 100644 (file)
@@ -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