summaryrefslogtreecommitdiffstats
path: root/bin/snapshot
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2003-01-02 20:48:33 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2003-01-02 20:48:33 (GMT)
commit7fb720becf8bdb56179b93004d318e5f1c49fc2a (patch)
treedec30c37a8d4b71625d8c405c765f0b04b094981 /bin/snapshot
parentca003aafc426db7b57f9c83b34f0ca3eec943816 (diff)
downloadhdf5-7fb720becf8bdb56179b93004d318e5f1c49fc2a.zip
hdf5-7fb720becf8bdb56179b93004d318e5f1c49fc2a.tar.gz
hdf5-7fb720becf8bdb56179b93004d318e5f1c49fc2a.tar.bz2
[svn-r6225] Purpose:
Bug fix Description: SGI shell treats $0 as function name if used in a function. Set the name here to avoid that ambiguity and better style too. Platforms tested: Just in modi4 and burrwhite since it is a shell script and the change is machine independent.
Diffstat (limited to 'bin/snapshot')
-rwxr-xr-xbin/snapshot10
1 files changed, 7 insertions, 3 deletions
diff --git a/bin/snapshot b/bin/snapshot
index 731aa2b..c47e27f 100755
--- a/bin/snapshot
+++ b/bin/snapshot
@@ -27,12 +27,16 @@ TIMESTAMP()
EXIT_BANNER()
{
-TIMESTAMP "Exit $0 with status=$?"
+TIMESTAMP "Exit $PROGNAME with status=$?"
}
# MAIN
+# SGI /bin/sh replaces $0 as function name if used in a function.
+# Set the name here to avoid that ambiguity and better style too.
+PROGNAME=$0
+
echo "====================================="
-echo "$0 $*"
+echo "$PROGNAME $*"
echo "====================================="
TIMESTAMP MAIN
uname -a
@@ -164,7 +168,7 @@ done
if [ "$cmd" = help ]; then
set -
cat <<EOF
-Usage: $0 [all] [checkout] [diff] [test] [srcdir] [release] [help]
+Usage: $PROGNAME [all] [checkout] [diff] [test] [srcdir] [release] [help]
[zlib <zlib_path>] [archive <arch_path>] [dir <dir>]
[op-configure <option>] [--<option>]
all: Run all commands (checkout, test & release)