summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-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