summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2003-03-04 23:06:13 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2003-03-04 23:06:13 (GMT)
commitb0bcccf0eeea3dee05ce3e5b999a4793a7ce6afc (patch)
tree5e6cdbdfb6bcbaea40b98a21a48cff78acc70e44
parentb1caacbbf5f16be3f77a0903fd7ad0fb32a026f6 (diff)
downloadhdf5-b0bcccf0eeea3dee05ce3e5b999a4793a7ce6afc.zip
hdf5-b0bcccf0eeea3dee05ce3e5b999a4793a7ce6afc.tar.gz
hdf5-b0bcccf0eeea3dee05ce3e5b999a4793a7ce6afc.tar.bz2
[svn-r6457] Purpose:
new feature Description: Added a force mode (-force) which turns off prompting, just do it. Platforms tested: Tested h5committest {arabica (fortran), eirene (fortran, C++) modi4 (parallel, fortran)}? no [If no, why not?] It is just a shell script. Tested it in eirene. Misc. update: Will check in the updated RELEASE and document files.
-rwxr-xr-xtools/misc/h5redeploy.in22
1 files changed, 15 insertions, 7 deletions
diff --git a/tools/misc/h5redeploy.in b/tools/misc/h5redeploy.in
index 7f9ac2a..4a6f222 100755
--- a/tools/misc/h5redeploy.in
+++ b/tools/misc/h5redeploy.in
@@ -16,8 +16,9 @@ usage() {
# A wonderfully informative "usage" message.
echo "usage: $prog_name [OPTIONS]"
echo " OPTIONS:"
- echo " -help This help message."
+ echo " -help|help This help message"
echo " -echo Show all the shell commands executed"
+ echo " -force No prompt, just do it"
echo " -prefix=DIR New directory to find HDF5 lib/ and include/"
echo " subdirectories [default: current directory]"
echo " -tool=TOOL Tool to update. TOOL must be in the current"
@@ -59,6 +60,7 @@ ERROR()
#
# Initialization
h5tools=h5cc
+fmode= # default off
prefix=`(cd ..;pwd)`
# Parse options
@@ -79,6 +81,9 @@ for arg in $@ ; do
-help|help)
usage
;;
+ -force)
+ fmode=yes
+ ;;
*)
ERROR "Unknown Option($arg)"
usage
@@ -103,12 +108,15 @@ done
# Show actions to be taken and get consent
show_action
-echo -n "Continue? (yes/no)"
-read ansx
-ans=`echo $ansx | tr "[A-Z]" "[a-z]"`
-if [ x-$ans != x-yes ]; then
- echo ABORT. No tools changed.
- exit 1
+# Ask confirmation unless fmode is on
+if [ x-$fmode = x- ]; then
+ echo -n "Continue? (yes/no)"
+ read ansx
+ ans=`echo $ansx | tr "[A-Z]" "[a-z]"`
+ if [ x-$ans != x-yes ]; then
+ echo ABORT. No tools changed.
+ exit 1
+ fi
fi