mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-09-20 01:59:57 +02:00
alsaconf: use 'type -p', not which
Here is a small patch for alsaconf, which removes an useless dependency on `which' by using a bash built-in instead : `type -p'. I encountered the problem of the missing `which' while using alsaconf on a clfs-built linux system. It is useless to install `which' when we already have `type -p', and alsaconf already needs bash, so this does not replace a dependency by another one, but really removes a dependency for alsaconf. Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
8fc2c39dc8
commit
07ca0dd40b
1 changed files with 4 additions and 4 deletions
|
@ -31,7 +31,7 @@ PROCFS="/proc"
|
||||||
SYSFS="/sys"
|
SYSFS="/sys"
|
||||||
|
|
||||||
# i18n stuff
|
# i18n stuff
|
||||||
if test "$USE_NLS" = "yes" && which gettext > /dev/null; then
|
if test "$USE_NLS" = "yes" && type -p gettext > /dev/null; then
|
||||||
xecho() {
|
xecho() {
|
||||||
gettext -s "$*"
|
gettext -s "$*"
|
||||||
}
|
}
|
||||||
|
@ -316,10 +316,10 @@ fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check for dialog, whiptail, gdialog, awk, ... ?
|
# Check for dialog, whiptail, gdialog, awk, ... ?
|
||||||
if which dialog > /dev/null; then
|
if type -p dialog > /dev/null; then
|
||||||
DIALOG=dialog
|
DIALOG=dialog
|
||||||
else
|
else
|
||||||
if which whiptail > /dev/null; then
|
if type -p whiptail > /dev/null; then
|
||||||
whiptail_wrapper() {
|
whiptail_wrapper() {
|
||||||
X1="$1"
|
X1="$1"
|
||||||
X2="$2"
|
X2="$2"
|
||||||
|
@ -337,7 +337,7 @@ else
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if which awk > /dev/null; then :
|
if type -p awk > /dev/null; then :
|
||||||
else
|
else
|
||||||
xecho "Error, awk not found. Can't continue."
|
xecho "Error, awk not found. Can't continue."
|
||||||
exit 1
|
exit 1
|
||||||
|
|
Loading…
Reference in a new issue