summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-05-11 16:02:51 +0000
committerlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-05-11 16:02:51 +0000
commit7a181c1d045067ae271a7809a2c30b343a23f7d7 (patch)
treeca5ad7a91b2f002b5b3a70d54ab1f215bac8e81e
parent8a9837708a787cea2652883d06f41bf41b04a90f (diff)
downloadATCD-7a181c1d045067ae271a7809a2c30b343a23f7d7.tar.gz
support shells that don't have $OPTIND
-rwxr-xr-xTAO/performance-tests/Cubit/TAO/MT_Cubit/MT_Cubit_Test25
1 files changed, 16 insertions, 9 deletions
diff --git a/TAO/performance-tests/Cubit/TAO/MT_Cubit/MT_Cubit_Test b/TAO/performance-tests/Cubit/TAO/MT_Cubit/MT_Cubit_Test
index fd21385fae8..b7cf303ed43 100755
--- a/TAO/performance-tests/Cubit/TAO/MT_Cubit/MT_Cubit_Test
+++ b/TAO/performance-tests/Cubit/TAO/MT_Cubit/MT_Cubit_Test
@@ -38,19 +38,26 @@ while getopts ?ln:r:t arg; do
'?' ) echo $usage; echo $usage2; exit 0 ;;
esac
done
-shift `expr $OPTIND - 1`
-if [ $# -ne 1 ]; then
- echo $usage; echo $usage2
- exit 1
-fi
-threads=`expr $1 + 1`
+if [ "$OPTIND" ]; then
+ shift `expr $OPTIND - 1`
+
+ if [ $# -ne 1 ]; then
+ echo $usage; echo $usage2
+ exit 1
+ fi
+else
+ #### sh does not support $OPTIND. Arg error checking isn't as good.
+ if [ $# -lt 1 ]; then
+ echo $usage; echo $usage2
+ exit 1
+ fi
-if [ $threads -ge 40 ]; then
- echo $0: limit of 40 threads
- exit 0
+ shift `expr $# - 1`
fi
+threads=`expr $1 + 1`
+
########
######## Make sure that the executables have been built.