summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2003-04-23 05:59:21 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2003-04-23 05:59:21 (GMT)
commit4f923a56ca79cf19758351ad8e49366fbf2916c7 (patch)
treeb7a59ea4434c5bc7cc2677a87d74f9e5e6b249da /tools
parent8bbf1fb8e0f75efd88742eae03409e9c7ef9d11c (diff)
downloadhdf5-4f923a56ca79cf19758351ad8e49366fbf2916c7.zip
hdf5-4f923a56ca79cf19758351ad8e49366fbf2916c7.tar.gz
hdf5-4f923a56ca79cf19758351ad8e49366fbf2916c7.tar.bz2
[svn-r6736] Purpose:
update Description: Added h5fc to the h5tools list. Added feature that it will udpate tools that are present. (Would still abort if no tools found at all.) Platforms tested: Did not h5committest since it does not test this tool at all. Did various test in eirene by hand. Misc. update:
Diffstat (limited to 'tools')
-rwxr-xr-xtools/misc/h5redeploy.in24
1 files changed, 16 insertions, 8 deletions
diff --git a/tools/misc/h5redeploy.in b/tools/misc/h5redeploy.in
index 8ec3f87..9423729 100755
--- a/tools/misc/h5redeploy.in
+++ b/tools/misc/h5redeploy.in
@@ -48,7 +48,7 @@ dump_vars(){
show_action()
{
echo "Update the following tools because they are now installed at a new directory"
- for t in $h5tools; do
+ for t in $foundtools; do
echo "${t}:"
echo -n " current setting="
sed -e "/^prefix=/s/prefix=//p" -e d $t
@@ -67,8 +67,9 @@ ERROR()
# Main
#
# Initialization
-h5tools=h5cc
-fmode= # default off
+h5tools="h5cc h5fc" # possible hdf5 tools
+foundtools= # tools found and will be modified
+fmode= # force mode, default is off
prefix=`(cd ..;pwd)`
# Parse options
@@ -107,12 +108,19 @@ if [ ! -d $prefix ]; then
fi
for x in $h5tools; do
- if [ ! -w $x ]; then
- ERROR "h5tool($h5tools) is not found in the current directory or is not writable"
- exit 1
+ if [ -f $x ]; then
+ foundtools="$foundtools $x"
+ if [ ! -w $x ]; then
+ ERROR "h5tool($x) is not writable"
+ exit 1
+ fi
fi
done
-
+
+if [ -z $foundtools ]; then
+ ERROR "found no tools to modify"
+ exit 1
+fi
# Show actions to be taken and get consent
show_action
@@ -145,7 +153,7 @@ if [ "$SHOW" = "echo" ]; then
echo "===End Update commands====="
fi
-for t in $h5tools; do
+for t in $foundtools; do
echo Update $t ...
COMMAND="ed - $t"
if [ "$SHOW" = "echo" ]; then