summaryrefslogtreecommitdiffstats
path: root/utils/subfiling_vfd
diff options
context:
space:
mode:
authorScot Breitenfeld <brtnfld@hdfgroup.org>2023-04-28 12:45:29 (GMT)
committerGitHub <noreply@github.com>2023-04-28 12:45:29 (GMT)
commit8e8d98319bc166c2948b9defcc0de471a68112a3 (patch)
treecbc4e66802bc2f5e7081e9548526271df9206397 /utils/subfiling_vfd
parentb5ecb0af6dc0665d16ee7f257332741fcbef91a2 (diff)
downloadhdf5-8e8d98319bc166c2948b9defcc0de471a68112a3.zip
hdf5-8e8d98319bc166c2948b9defcc0de471a68112a3.tar.gz
hdf5-8e8d98319bc166c2948b9defcc0de471a68112a3.tar.bz2
h5fuse.sh fix for summit. (#2841)
* updated directory locations
Diffstat (limited to 'utils/subfiling_vfd')
-rwxr-xr-xutils/subfiling_vfd/h5fuse.sh.in16
1 files changed, 6 insertions, 10 deletions
diff --git a/utils/subfiling_vfd/h5fuse.sh.in b/utils/subfiling_vfd/h5fuse.sh.in
index 09a3a05..2085033 100755
--- a/utils/subfiling_vfd/h5fuse.sh.in
+++ b/utils/subfiling_vfd/h5fuse.sh.in
@@ -102,28 +102,23 @@ FAILED=1
# Configure file checks #
############################################################
#
-SUBF_CONFDIR="${H5FD_SUBFILING_CONFIG_FILE_PREFIX:-.}"
-
-# cd to the subfile configuration location
-if [ "$SUBF_CONFDIR" != "." ] || [ "$SUBF_CONFDIR" != "$PWD" ]; then
- cd "$SUBF_CONFDIR" || exit
-fi
+SUBF_CONFDIR="${H5FD_SUBFILING_CONFIG_FILE_PREFIX:-$PWD}"
# Try to find the config file
if [ -z "$file_config" ]; then
nfiles=$(find "$SUBF_CONFDIR" -maxdepth 1 -type f -iname "*.config" -printf '.' | wc -m)
if [[ "$nfiles" != "1" ]]; then
if [[ "$nfiles" == "0" ]]; then
- echo -e "$RED Failed to find .config file in current directory. $NC"
+ echo -e "$RED Failed to find .config file in ${SUBF_CONFDIR} $NC"
usage
exit $FAILED
else
- echo -e "$RED More than one .config file found in current directory. $NC"
+ echo -e "$RED More than one .config file found in ${SUBF_CONFDIR} $NC"
usage
exit $FAILED
fi
fi
- file_config=$(find "$SUBF_CONFDIR" -maxdepth 1 -type f -iname '*.config')
+ file_config=$(find "${SUBF_CONFDIR}" -maxdepth 1 -type f -iname '*.config')
fi
if [ ! -f "$file_config" ]; then
@@ -150,7 +145,8 @@ if test -z "$subfile_dir"; then
fi
# For bash 4.4+
-mapfile -t subfiles < <( sed -e '1,/subfile_dir=/d' "$file_config" )
+subfs=$(sed -e '1,/subfile_dir=/d' "$file_config")
+mapfile -t subfiles <<< "$subfs"
if [ ${#subfiles[@]} -eq 0 ]; then
echo -e "$RED failed to find subfiles list in $file_config $NC"
exit $FAILED