From aec3e1242d0d0f5c0fcbe796f2c2801c828e7efb Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Fri, 25 Sep 2015 18:32:57 -0500 Subject: [svn-r27880] Changes to autogen.sh - Removed the long options, which are not supported under the getopts builtin. - Correctly labeled the autogen.sh script as requiring bash (via the #!). We may need to remove the bash constructs before the 1.10 release and revert to sh. - The help output is now correct. Tested on: local linux --- autogen.sh | 32 +++++++++----------------------- 1 file changed, 9 insertions(+), 23 deletions(-) diff --git a/autogen.sh b/autogen.sh index fa2e2d2..d76c016 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,4 +1,4 @@ -#! /bin/sh +#! /bin/bash # # Copyright by The HDF Group. # All rights reserved. @@ -60,7 +60,7 @@ # # This script takes two potential options: # -# -p, --production +# -p # # When this is selected, the autotools versions are set to the paths # and versions used by The HDF Group to produce the released versions @@ -70,7 +70,7 @@ # to have recent versions of the autotools this option will probably # be removed. # -# -v, --verbose +# -v # # This emits some extra information, mainly tool versions. @@ -89,33 +89,19 @@ verbose=false optspec=":hpv-" while getopts "$optspec" optchar; do case "${optchar}" in - -) - case "${OPTARG}" in - production) - echo "Setting production mode..." - echo - production=true - ;; - verbose) - echo "Setting verbosity: high" - echo - verbose=true - ;; - *) - if [ "$OPTERR" = 1 ] && [ "${optspec:0:1}" != ":" ]; then - echo "Unknown option --${OPTARG}" >&2 - fi - ;; - esac;; h) - echo "usage: $0 [-p|--production]" + echo "usage: $0 [OPTIONS]" + echo + echo " -h Print this help message." echo echo " -p Used by THG to ensure that particular versions" echo " of the autotools are used and hard-codes" echo " autotools paths to THG machines. Not for" echo " non-HDF-Group users!" echo - echo " NOTE: Each autotool can be set via an environment variable." + echo " -v Show more verbose output." + echo + echo " NOTE: Each tool can be set via an environment variable." echo " These are documented inside this autogen.sh script." echo exit 0 -- cgit v0.12