Initial copy of QtMultimediaKit.
Comes from original repo, with SHA1: 2c82d5611655e5967f5c5095af50c0991c4378b2
This commit is contained in:
40
config.tests/tools/which.test
Executable file
40
config.tests/tools/which.test
Executable file
@@ -0,0 +1,40 @@
|
||||
#!/bin/sh
|
||||
#borrowed from Qt
|
||||
|
||||
HOME=/dev/null
|
||||
export HOME
|
||||
|
||||
unset which
|
||||
|
||||
WHICH=`which which 2>/dev/null`
|
||||
if echo $WHICH | grep 'shell built-in command' >/dev/null 2>&1; then
|
||||
WHICH=which
|
||||
elif [ -z "$WHICH" ]; then
|
||||
if which which >/dev/null 2>&1; then
|
||||
WHICH=which
|
||||
else
|
||||
for a in /usr/ucb /usr/bin /bin /usr/local/bin; do
|
||||
if [ -x $a/which ]; then
|
||||
WHICH=$a/which
|
||||
break;
|
||||
fi
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z "$WHICH" ]; then
|
||||
IFS=:
|
||||
for a in $PATH; do
|
||||
if [ -x $a/$1 ]; then
|
||||
echo "$a/$1"
|
||||
exit 0
|
||||
fi
|
||||
done
|
||||
else
|
||||
a=`"$WHICH" "$1" 2>/dev/null`
|
||||
if [ ! -z "$a" -a -x "$a" ]; then
|
||||
echo "$a"
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
exit 1
|
||||
Reference in New Issue
Block a user