1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/build/package/mac_osx/make-diskimage Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,47 @@ 1.4 +#!/bin/sh 1.5 +# This Source Code Form is subject to the terms of the Mozilla Public 1.6 +# License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 +# file, You can obtain one at http://mozilla.org/MPL/2.0/. 1.8 + 1.9 +# Create a read-only disk image of the contents of a folder 1.10 +# 1.11 +# Usage: make-diskimage <image_file> 1.12 +# <src_folder> 1.13 +# <volume_name> 1.14 +# <eula_resource_file> 1.15 +# <.dsstore_file> 1.16 +# <background_image_file> 1.17 +# 1.18 +# tip: use '-null-' for <eula-resource-file> if you only want to 1.19 +# provide <.dsstore_file> and <background_image_file> 1.20 + 1.21 +DMG_PATH=$1 1.22 +SRC_FOLDER=$2 1.23 +VOLUME_NAME=$3 1.24 + 1.25 +# optional arguments 1.26 +EULA_RSRC=$4 1.27 +DMG_DSSTORE=$5 1.28 +DMG_BKGND_IMG=$6 1.29 + 1.30 +EXTRA_ARGS= 1.31 + 1.32 +if test -n "$EULA_RSRC" && test "$EULA_RSRC" != "-null-" ; then 1.33 + EXTRA_ARGS="--resource $EULA_RSRC" 1.34 +fi 1.35 + 1.36 +if test -n "$DMG_DSSTORE" ; then 1.37 + EXTRA_ARGS="$EXTRA_ARGS --copy $DMG_DSSTORE:/.DS_Store" 1.38 +fi 1.39 + 1.40 +if test -n "$DMG_BKGND_IMG" ; then 1.41 + EXTRA_ARGS="$EXTRA_ARGS --mkdir /.background --copy $DMG_BKGND_IMG:/.background" 1.42 +fi 1.43 + 1.44 +echo `dirname $0`/pkg-dmg --target "$DMG_PATH" --source "$SRC_FOLDER" \ 1.45 + --volname "$VOLUME_NAME" $EXTRA_ARGS 1.46 + 1.47 +`dirname $0`/pkg-dmg --target "$DMG_PATH" --source "$SRC_FOLDER" \ 1.48 + --volname "$VOLUME_NAME" $EXTRA_ARGS 1.49 + 1.50 +exit $?