summaryrefslogtreecommitdiffstats
path: root/test/bctest
diff options
context:
space:
mode:
authorBodo Möller <bodo@openssl.org>2001-04-08 13:49:45 +0000
committerBodo Möller <bodo@openssl.org>2001-04-08 13:49:45 +0000
commit5f1fddbbe787e594de2efe746ac00143da655fcc (patch)
tree455d9805342136a41a50870015a34d6991420ca5 /test/bctest
parent027e257b1da1289b64587dc5bde598920feaee8c (diff)
'||', '&&' and 'test -x' apparently don't work on Ultrix;
also 'test' appears to be available as '[' only in 'if' conditions.
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