diff options
author | Scot Breitenfeld <brtnfld@hdfgroup.org> | 2023-04-28 12:45:29 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-28 12:45:29 (GMT) |
commit | 8e8d98319bc166c2948b9defcc0de471a68112a3 (patch) | |
tree | cbc4e66802bc2f5e7081e9548526271df9206397 | |
parent | b5ecb0af6dc0665d16ee7f257332741fcbef91a2 (diff) | |
download | hdf5-8e8d98319bc166c2948b9defcc0de471a68112a3.zip hdf5-8e8d98319bc166c2948b9defcc0de471a68112a3.tar.gz hdf5-8e8d98319bc166c2948b9defcc0de471a68112a3.tar.bz2 |
h5fuse.sh fix for summit. (#2841)
* updated directory locations
-rw-r--r-- | testpar/t_subfiling_vfd.c | 2 | ||||
-rwxr-xr-x | utils/subfiling_vfd/h5fuse.sh.in | 16 |
2 files changed, 7 insertions, 11 deletions
diff --git a/testpar/t_subfiling_vfd.c b/testpar/t_subfiling_vfd.c index 0c2bca7..85df3bd 100644 --- a/testpar/t_subfiling_vfd.c +++ b/testpar/t_subfiling_vfd.c @@ -1858,7 +1858,7 @@ test_subfiling_h5fuse(void) args[0] = HDstrdup("env"); args[1] = HDstrdup("sh"); args[2] = HDstrdup("h5fuse.sh"); - args[3] = HDstrdup("-f"); + args[3] = HDstrdup("-q -f"); args[4] = tmp_filename; args[5] = NULL; 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 |