diff options
author | Allen Byrne <50328838+byrnHDF@users.noreply.github.com> | 2022-06-09 21:29:04 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-09 21:29:04 (GMT) |
commit | 0311d4c00a14ad2268c3b2aaa4a248c423afdbc8 (patch) | |
tree | 5fd961a0cf50912145cb0e2420566913170726d4 /java/examples/groups/JavaGroupExample.sh.in | |
parent | b2794b474acaf9050b03239502056bdd34975db8 (diff) | |
download | hdf5-0311d4c00a14ad2268c3b2aaa4a248c423afdbc8.zip hdf5-0311d4c00a14ad2268c3b2aaa4a248c423afdbc8.tar.gz hdf5-0311d4c00a14ad2268c3b2aaa4a248c423afdbc8.tar.bz2 |
Hdf5 1 10 sync (#1795)
* Branch sync updates and spelling
* Revert format of getenv
Diffstat (limited to 'java/examples/groups/JavaGroupExample.sh.in')
-rw-r--r-- | java/examples/groups/JavaGroupExample.sh.in | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/java/examples/groups/JavaGroupExample.sh.in b/java/examples/groups/JavaGroupExample.sh.in index 86f90bf..1b84ed3 100644 --- a/java/examples/groups/JavaGroupExample.sh.in +++ b/java/examples/groups/JavaGroupExample.sh.in @@ -26,6 +26,7 @@ CMP='cmp' DIFF='diff -c' CP='cp' DIRNAME='dirname' +BASENAME='basename' LS='ls' AWK='awk' @@ -95,17 +96,21 @@ COPY_LIBFILES_TO_BLDLIBDIR() INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` INODE_DDIR=`$LS -i -d $BLDLIBDIR | $AWK -F' ' '{print $1}'` if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $CP -f $tstfile $BLDLIBDIR + $CP -fR $tstfile $BLDLIBDIR if [ $? -ne 0 ]; then echo "Error: FAILED to copy $tstfile ." # Comment out this to CREATE expected file exit $EXIT_FAILURE fi + BNAME=`$BASENAME $tstfile` + if [ "$BNAME" = "libhdf5_java.dylib" ]; then + COPIED_LIBHDF5_JAVA=1 + fi fi fi done - if [ "$IS_DARWIN" = "yes" ]; then + if [[ "$IS_DARWIN" = "yes" ]] && [[ $COPIED_LIBHDF5_JAVA -eq 1 ]]; then (cd $BLDLIBDIR; \ install_name_tool -add_rpath @loader_path libhdf5_java.dylib; \ exist_path=` otool -l libhdf5_java.dylib | grep libhdf5 | grep -v java | awk '{print $2}'`; \ @@ -126,7 +131,7 @@ COPY_LIBFILES_TO_BLDLIBDIR() INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` INODE_DDIR=`$LS -i -d $BLDLIBDIR | $AWK -F' ' '{print $1}'` if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $CP -f $tstfile $BLDLIBDIR + $CP -fR $tstfile $BLDLIBDIR if [ $? -ne 0 ]; then echo "Error: FAILED to copy $tstfile ." @@ -147,10 +152,7 @@ CLEAN_LIBFILES_AND_BLDLIBDIR() INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` INODE_DDIR=`$LS -i -d $BLDLIBDIR | $AWK -F' ' '{print $1}'` if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - for tstfile in $COPY_JARTESTFILES - do - $RM $BLDLIBDIR/tstfile - done + $RM -rf $BLDLIBDIR fi } |