'||', '&&' and 'test -x' apparently don't work on Ultrix;
also 'test' appears to be available as '[' only in 'if' conditions.
This commit is contained in:
18
test/bctest
18
test/bctest
@@ -12,10 +12,22 @@
|
||||
|
||||
|
||||
IFS=:
|
||||
for dir in $PATH; do
|
||||
bc="$dir/bc"
|
||||
try_path=true
|
||||
# First we try "bc", then "$dir/bc" for each item in $PATH.
|
||||
for dir in dummy:$PATH; do
|
||||
if [ "$try_path" = true ]; then
|
||||
# first iteration
|
||||
bc=bc
|
||||
try_path=false
|
||||
else
|
||||
# second and later iterations
|
||||
bc="$dir/bc"
|
||||
if [ ! -f "$bc" ]; then # '-x' is not available on Ultrix
|
||||
bc=''
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -x "$bc" -a ! -d "$bc" ]; then
|
||||
if [ ! "$bc" = '' ]; then
|
||||
failure=none
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user