summaryrefslogtreecommitdiffstats
path: root/tools/misc/h5redeploy.in
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2010-01-28 13:11:38 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2010-01-28 13:11:38 (GMT)
commit3360c3af0c100ac4d3a2fe2865f34661da862ec5 (patch)
tree9caf7dba62679504aa39ec02ebb72d8b8b5a848d /tools/misc/h5redeploy.in
parent5b4d3279099e7e4fad6e0092c77aa93dfd35d616 (diff)
downloadhdf5-3360c3af0c100ac4d3a2fe2865f34661da862ec5.zip
hdf5-3360c3af0c100ac4d3a2fe2865f34661da862ec5.tar.gz
hdf5-3360c3af0c100ac4d3a2fe2865f34661da862ec5.tar.bz2
[svn-r18175] Description:
Bring r17986:18172 from trunk to revise_chunks branch. Tested on: FreeBSD/32 6.3 (duty) in debug mode FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Diffstat (limited to 'tools/misc/h5redeploy.in')
-rwxr-xr-xtools/misc/h5redeploy.in18
1 files changed, 11 insertions, 7 deletions
diff --git a/tools/misc/h5redeploy.in b/tools/misc/h5redeploy.in
index 6abca62..ae79b70 100755
--- a/tools/misc/h5redeploy.in
+++ b/tools/misc/h5redeploy.in
@@ -18,6 +18,10 @@
## in a new location.
## For help page, use "h5redeploy -help"
+# Constants definitions
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+
# Function definitions
# show help page
@@ -34,7 +38,7 @@ usage() {
echo " directory and writable. [default: $h5tools]"
echo " -show Show the commands without executing them"
echo " "
- exit 1
+ exit $EXIT_FAILURE
}
# display variable values
@@ -96,7 +100,7 @@ for arg in $@ ; do
*)
ERROR "Unknown Option($arg)"
usage
- exit 1
+ exit $EXIT_FAILURE
;;
esac
done
@@ -104,7 +108,7 @@ done
# Sanity checks
if [ ! -d $prefix ]; then
ERROR "prefix($prefix) is not an existing directory"
- exit 1
+ exit $EXIT_FAILURE
fi
for x in $h5tools; do
@@ -112,14 +116,14 @@ for x in $h5tools; do
foundtools="$foundtools $x"
if [ ! -w $x ]; then
ERROR "h5tool($x) is not writable"
- exit 1
+ exit $EXIT_FAILURE
fi
fi
done
if [ -z "$foundtools" ]; then
ERROR "found no tools to modify"
- exit 1
+ exit $EXIT_FAILURE
fi
# Show actions to be taken and get consent
@@ -131,7 +135,7 @@ if [ x-$fmode = x- ]; then
ans=`echo $ansx | tr "[A-Z]" "[a-z]"`
if [ x-$ans != x-yes ]; then
echo ABORT. No tools changed.
- exit 1
+ exit $EXIT_FAILURE
fi
fi
@@ -166,7 +170,7 @@ done
# Cleanup
rm -f $CMDFILE
-exit 0
+exit $EXIT_SUCCESS
# Some possible future features to add
# CCBASE - Name of the alternative C compiler