summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2015-04-27 08:27:08 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2015-04-27 08:27:08 (GMT)
commit4b695af33c370e42d511c527fc48c88cf9b4bfd6 (patch)
treec5f1c998b1a5492bb6fd8af5a5e8e654af33a461 /bin
parent865c930af9b38b720e2479023820ebbc29fa30b7 (diff)
downloadhdf5-4b695af33c370e42d511c527fc48c88cf9b4bfd6.zip
hdf5-4b695af33c370e42d511c527fc48c88cf9b4bfd6.tar.gz
hdf5-4b695af33c370e42d511c527fc48c88cf9b4bfd6.tar.bz2
[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)
Diffstat (limited to 'bin')
-rwxr-xr-xbin/cmakehdf537
1 files changed, 36 insertions, 1 deletions
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-<version>-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=$?