From 9c3568819f3e15d95a47e544fc13e00995e54f0e Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Tue, 22 Mar 2016 02:37:07 -0500 Subject: [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 --- autogen.sh | 8 +++++--- 1 file 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 -- cgit v0.12