summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoey <joey>2002-05-26 05:06:51 +0000
committerjoey <joey>2002-05-26 05:06:51 +0000
commit4106beebd28b7fe73dd19e43cf15378c08b8241f (patch)
treea2b42f4eefb46e7b3ae27ab09d115f1093fa6103
parent9dc5e9ccba3756ad14d7c2941c3130243bbc4406 (diff)
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-base2
-rw-r--r--autoscripts/postinst-suid2
-rw-r--r--autoscripts/postinst-xaw4
-rw-r--r--autoscripts/postinst-xfonts2
-rw-r--r--autoscripts/postrm-menu2
-rw-r--r--autoscripts/postrm-menu-method2
-rw-r--r--autoscripts/postrm-mime2
-rw-r--r--autoscripts/postrm-suid2
-rw-r--r--autoscripts/postrm-xaw4
-rw-r--r--autoscripts/prerm-doc-base2
-rw-r--r--debian/changelog9
11 files changed, 21 insertions, 12 deletions
diff --git a/autoscripts/postinst-doc-base b/autoscripts/postinst-doc-base
index fce4d17..3926572 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 820d69a..d0d16c0 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 035aa26..f7703dc 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 4c5ab1b..96390e4 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 a34b6f1..a180558 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 2e0faed..0d573fd 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 e993233..a940411 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 340736a..46fee33 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 14d13eb..61bd3c9 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 d2b07eb..7ec95b7 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 3bc66f6..c4b0239 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