aboutsummaryrefslogtreecommitdiffstats
path: root/test/bctest
diff options
context:
space:
mode:
Diffstat (limited to 'test/bctest')
-rwxr-xr-xtest/bctest18
1 files changed, 15 insertions, 3 deletions
diff --git a/test/bctest b/test/bctest
index 17b75d4eca..7dde781653 100755
--- a/test/bctest
+++ b/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