From 94daa6451819f4ee2d45ae5e4d6700a395d043a5 Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Mon, 14 Mar 2011 15:26:54 +0100 Subject: [PATCH] iteration on the dmg packager --- macos/build-dmg.sh | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/macos/build-dmg.sh b/macos/build-dmg.sh index 0144705..b901ef0 100755 --- a/macos/build-dmg.sh +++ b/macos/build-dmg.sh @@ -39,17 +39,28 @@ function git_tag () { echo $1 | cut -d @ -f 2 ; } # git://git.onelab.eu/sface.git@sface-0.1-5 # sface # /Volumes/sface-skel-sn/sface.app/Contents/Resources/ +# or, with the -f (-file) option: +# git_retrieve -f \ +# git://git.onelab.eu/sface.git@sface-0.1-5 +# macos/appIcon.icns +# /Volumes/sface-skel-sn/sface.app/appIcon.icns function git_retrieve () { + filemode="" + case "$1" in -f|--file) filemode=true; shift;; esac gitpath=$1; shift path=$1; shift dest=$1; shift giturl=$(git_url $gitpath) gittag=$(git_tag $gitpath) - [ -d $dest ] || mkdir -p $dest - pushd $dest >& /dev/null - git archive --remote=${giturl} ${gittag} | tar -xf - ${path} - popd + if [ -z "$filemode"] ; then + [ -d $dest ] || mkdir -p $dest + pushd $dest >& /dev/null + git archive --remote=${giturl} ${gittag} | tar -xf - ${path} + popd + else + git archive --remote=${giturl} ${gittag} | tar -xOf - ${path} > ${dest} + fi } function die () { @@ -110,11 +121,13 @@ Also make sure to trash the current one before retrying" git_retrieve $sface_GITPATH sface $img_mnt/$resource_path/ # copy binaries from sface to the bin dir for bin in sface.bin sface-run; do - git_retrieve $sface_GITPATH $bin $img_mnt/$bin_path + git_retrieve --file $sface_GITPATH $bin $img_mnt/$bin_path/$bin done # install background and app icons - git_retrieve $sface_GITPATH macos/background.png $img_mnt/$background_path - git_retrieve $sface_GITPATH macos/appIcon.icns $img_mnt/$icon_path + git_retrieve --file $sface_GITPATH macos/background.png $img_mnt/$background_path/background.png + git_retrieve --file $sface_GITPATH macos/appIcon.icns $img_mnt/$icon_path/appIcon.icns + # xxx ? + git_retrieve --file $sface_GITPATH macos/appIcon.icns $img_mnt/.VolumeIcon.icns # this apparently requires xcode /Developer/Tools/SetFile -a V $img_mnt/$background_path -- 2.43.0