summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDavid Young <dyoung@hdfgroup.org>2019-12-19 23:27:12 (GMT)
committerDavid Young <dyoung@hdfgroup.org>2019-12-19 23:27:12 (GMT)
commit3d89b55d61e2e61b665c81f8689564e58653eff3 (patch)
tree737af194b9a88b3dca8a9ee99578b4df8edc3eee /tools
parentd87609a188951c2c17eca52279bbac0c51193a7b (diff)
parent471df15556025fd211351ad54183fa196b2fd341 (diff)
downloadhdf5-3d89b55d61e2e61b665c81f8689564e58653eff3.zip
hdf5-3d89b55d61e2e61b665c81f8689564e58653eff3.tar.gz
hdf5-3d89b55d61e2e61b665c81f8689564e58653eff3.tar.bz2
Merge pull request #2160 in HDFFV/hdf5 from ~DYOUNG/netbsd:hdf5_1_12 to hdf5_1_12
* commit '471df15556025fd211351ad54183fa196b2fd341': In portable shell scripts (using #!/bin/sh) we have to use single square brackets, [ ], instead of the bash-ism double square brackets, [[ ]]. Make this script work on hosts where PERL is not installed at /usr/bin/perl. Use HD prefix. Fix HDFFV-10937: use a more reliable (and probably faster) scheme for visiting all elements of a matrix in an arbitrary order. Apparently, + has no special meaning, and neither does \+, in so-called "obsolete" / POSIX "basic" regular expressions. Also, not every version of `sed` out there supports the `-E` option. So delete the -E flag and use the regex `[^/][^/]*` instead of `[^/]+`. Make these scripts relocatable again: derive a relative path for the original installation prefix from the examples prefix. Use that relative path to locate the current installation prefix, always. Fall back to an absolute installation prefix if the relative path cannot be derived. Get the path to prefix right: needs a ../ to back out of subdirectory c/. Make this script relocatable again: derive a relative path for the original installation prefix from the examples prefix. Use that relative path to locate the current installation prefix, always. Fall back to an absolute installation prefix if the relative path cannot be derived. Let us override the examples directory using --with-examplesdir=DIR. This is handy for NetBSD where HDF5 examples are installed by convention in $prefix/share/examples/hdf5/ rather than in ${prefix}/share/hdf5_examples/, which is the HDF5 default. Follow longstanding execv convention for compatibility with NetBSD. Under the examples directories, always find the installed HDF5 executables and scripts using @prefix@ instead of a relative path, because the number of ../ in the relative path will be different on NetBSD than on other systems. Make the HDF5 configure script grok NetBSD. For portability, insulate the HDF5 library from some system macros. Not every system has perl installed in /usr/bin/, so change the shebang (#!) line to `/usr/bin/env perl` to locate perl on the PATH. For portability, use the POSIX sh(1) string-comparison operator `=` instead of `==`.
Diffstat (limited to 'tools')
-rw-r--r--tools/test/h5dump/testh5dump.sh.in2
-rw-r--r--tools/test/h5jam/testh5jam.sh.in4
2 files changed, 3 insertions, 3 deletions
diff --git a/tools/test/h5dump/testh5dump.sh.in b/tools/test/h5dump/testh5dump.sh.in
index 4b85138..dc7d999 100644
--- a/tools/test/h5dump/testh5dump.sh.in
+++ b/tools/test/h5dump/testh5dump.sh.in
@@ -923,7 +923,7 @@ GREPTEST()
cd $TESTDIR
$ENVCMD $RUNSERIAL $DUMPER_BIN -p "$@"
) >$actual 2>$actual_err
- if [[ "$txttype" = "ERRTXT" ]]; then
+ if [ "$txttype" = "ERRTXT" ]; then
$GREP "$expectdata" $actual_err > /dev/null
else
$GREP "$expectdata" $actual > /dev/null
diff --git a/tools/test/h5jam/testh5jam.sh.in b/tools/test/h5jam/testh5jam.sh.in
index 3ae180b..bf705b4 100644
--- a/tools/test/h5jam/testh5jam.sh.in
+++ b/tools/test/h5jam/testh5jam.sh.in
@@ -474,9 +474,9 @@ UNJAMTEST () {
#
TOOLTEST_OUTPUT() {
- if [ "$1" == "JAM" ]; then
+ if [ "$1" = "JAM" ]; then
TOOLCMD=$JAM_BIN/$JAM
- elif [ "$1" == "UNJAM" ]; then
+ elif [ "$1" = "UNJAM" ]; then
TOOLCMD=$JAM_BIN/$UNJAM
fi
shift