summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2016-03-22 07:37:07 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2016-03-22 07:37:07 (GMT)
commit9c3568819f3e15d95a47e544fc13e00995e54f0e (patch)
treec2bb241bd2e9a8813aa57585c2be6b0136ef703a
parent2280524115cf03b0aa2cb38406b19be32efb585d (diff)
downloadhdf5-9c3568819f3e15d95a47e544fc13e00995e54f0e.zip
hdf5-9c3568819f3e15d95a47e544fc13e00995e54f0e.tar.gz
hdf5-9c3568819f3e15d95a47e544fc13e00995e54f0e.tar.bz2
[svn-r29501] - POSIX compliance changes to autogen.sh
- autogen.sh now exits on unknown arguments Tested on: 64-bit Ubuntu 15.10 w/ gcc 5.2.1 autotools serial
-rwxr-xr-xautogen.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/autogen.sh b/autogen.sh
index 3c0ad7b..f3bd774 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,4 +1,4 @@
-#! /bin/bash
+#!/bin/sh
#
# Copyright by The HDF Group.
# All rights reserved.
@@ -110,8 +110,10 @@ while getopts "$optspec" optchar; do
verbose=true
;;
*)
- if [ "$OPTERR" != 1 ] || [ "${optspec:0:1}" = ":" ]; then
- echo "Non-option argument: '-${OPTARG}'" >&2
+ if [ "$OPTERR" != 1 ] || case $optspec in :*) ;; *) false; esac; then
+ echo "ERROR: non-option argument: '-${OPTARG}'" >&2
+ echo "Quitting"
+ exit 1
fi
;;
esac