1
 
-
#! /bin/bash
 
1
+
#!/bin/sh
2
2
 
#
3
3
 
# Copyright by The HDF Group.                                              
4
4
 
# All rights reserved.                                                     
5
5
 
#                                                                          
6
6
 
# This file is part of HDF5. The full HDF5 copyright notice, including     
7
7
 
# terms governing use, modification, and redistribution, is contained in   
8
8
 
# the files COPYING and Copyright.html.  COPYING can be found at the root  
9
9
 
# of the source code distribution tree; Copyright.html can be found at the 
10
10
 
# root level of an installed copy of the electronic document set and is    
11
11
 
# linked from the top-level documents page.  It can also be found at       
Show more
103
103
 
        echo "Setting THG production mode..."
104
104
 
        echo
105
105
 
        production=true
106
106
 
        ;;
107
107
 
    v)
108
108
 
        echo "Setting verbosity: high"
109
109
 
        echo
110
110
 
        verbose=true
111
111
 
        ;;
112
112
 
    *)
113
 
-
        if [ "$OPTERR" != 1 ] || [ "${optspec:0:1}" = ":" ]; then
114
 
-
            echo "Non-option argument: '-${OPTARG}'" >&2
 
113
+
        if [ "$OPTERR" != 1 ] || case $optspec in :*) ;; *) false; esac; then
 
114
+
            echo "ERROR: non-option argument: '-${OPTARG}'" >&2
 
115
+
            echo "Quitting"
 
116
+
            exit 1
115
117
 
        fi
116
118
 
        ;;
117
119
 
    esac
118
120
 
done
119
121
 
120
122
 
if [ "$production" = true ] ; then
121
123
 
122
124
 
    # Production mode
123
125
 
    #
124
126
 
    # Hard-code canonical HDF Group tool locations.