From 4b695af33c370e42d511c527fc48c88cf9b4bfd6 Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Mon, 27 Apr 2015 03:27:08 -0500 Subject: [svn-r26927] Merged r26925-26926 from trunk. Added method to install the Mac OSX DMG file by line commands. Group all install method into a function call for easier maintenance. Tested: Linux (jam), Mac (osx1010dev) --- bin/cmakehdf5 | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/bin/cmakehdf5 b/bin/cmakehdf5 index 4842f45..1e642d3 100755 --- a/bin/cmakehdf5 +++ b/bin/cmakehdf5 @@ -126,6 +126,40 @@ STEP() } +# Install the generated installation image file. Different platform uses +# different image files. +# Linux: HDF5--Linux.sh file +# Mac OS X: Not implemented yet +# Others: Not implemented yet +INSTALL_HDF5() +{ + myos="`uname -s`" + case "$myos" in + Linux) + install_file=./HDF5-${version}-Linux.sh + $install_file --skip-license $* + ;; + Darwin) # Mac OSX DMG file + install_file=HDF5-${version}-Darwin.dmg + test -d hdf5 || mkdir hdf5 + basename=`basename $install_file .dmg` + # mount the DMG file as /Volumes/$basename + # echo 'Y' as yes for license. + echo Y | hdiutil mount $install_file + # copy the contents to the install location + cp -R "/Volumes/$basename/HDF_Group" hdf5 + # unmount the DMG file + hdiutil unmount /Volumes/$basename + ;; + *) # unknown/unsupported OS. + echo "INSTALL_HDF5: Error--unknown/unsupported OS($myos)" + return 1 + ;; + esac + return 0 +} + + #========== # main #========== @@ -239,7 +273,8 @@ STEP "Test the library and tools..." "ctest . -C Release" $testlog STEP "Create an install image..." "cpack -C Release CPackConfig.cmake" $packlog # 8. Install with this command: -STEP "Install..." "./HDF5-${version}-Linux.sh --skip-license" $installlog +#STEP "Install..." "./HDF5-${version}-Linux.sh --skip-license" $installlog +STEP "Install..." "INSTALL_HDF5" $installlog # save the last exit code exit_code=$? -- cgit v0.12