summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2002-12-03 16:18:15 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2002-12-03 16:18:15 (GMT)
commitdb6808a25b1ccfcaa936811008c3e6a5bd75cc32 (patch)
tree13fb1893b2640ab8ca7d9d7a26ad792e910a1d0d
parent437dd9be23c86f8228bcb8b7090189a911cc00ef (diff)
downloadhdf5-db6808a25b1ccfcaa936811008c3e6a5bd75cc32.zip
hdf5-db6808a25b1ccfcaa936811008c3e6a5bd75cc32.tar.gz
hdf5-db6808a25b1ccfcaa936811008c3e6a5bd75cc32.tar.bz2
[svn-r6146] Description:
added a command so that snapshot prints a message before exiting. Platforms tested: eirene
-rwxr-xr-xbin/snapshot8
1 files changed, 8 insertions, 0 deletions
diff --git a/bin/snapshot b/bin/snapshot
index 8c246cb..731aa2b 100755
--- a/bin/snapshot
+++ b/bin/snapshot
@@ -25,6 +25,11 @@ TIMESTAMP()
echo "=====" "$1": "`date`" "====="
}
+EXIT_BANNER()
+{
+TIMESTAMP "Exit $0 with status=$?"
+}
+
# MAIN
echo "====================================="
echo "$0 $*"
@@ -32,6 +37,9 @@ echo "====================================="
TIMESTAMP MAIN
uname -a
+# setup exit banner message
+trap EXIT_BANNER 0
+
# The path isn't properly initialized on hawkwind -- /usr/local/bin is
# either missing or is after /usr/bin when it should be before.
PATH="/usr/local/bin:$PATH"