strict OSX packaging, fail on error
This commit is contained in:
parent
e90a784fb5
commit
f1b5f90a3e
@ -1,5 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
# script for pulling together a MacOSX app bundle.
|
# script for pulling together a MacOSX app bundle.
|
||||||
|
|
||||||
GTKSTACK_ROOT=$HOME/gtk/inst
|
GTKSTACK_ROOT=$HOME/gtk/inst
|
||||||
@ -231,6 +233,8 @@ else
|
|||||||
fi
|
fi
|
||||||
cp typeArdour.icns $Resources/
|
cp typeArdour.icns $Resources/
|
||||||
|
|
||||||
|
set +e # things below are not error-free (optional files etc) :(
|
||||||
|
|
||||||
# copy locale files
|
# copy locale files
|
||||||
if test x$WITH_NLS != x ; then
|
if test x$WITH_NLS != x ; then
|
||||||
echo "NLS support ..."
|
echo "NLS support ..."
|
||||||
@ -607,8 +611,6 @@ else
|
|||||||
fi
|
fi
|
||||||
VOLNAME=$APPNAME-$release_version
|
VOLNAME=$APPNAME-$release_version
|
||||||
|
|
||||||
# TODO use mktemp
|
|
||||||
export TMPDIR=`pwd`
|
|
||||||
MNTPATH=`mktemp -d -t ardourimg`
|
MNTPATH=`mktemp -d -t ardourimg`
|
||||||
TMPDMG=`mktemp -t ardour`
|
TMPDMG=`mktemp -t ardour`
|
||||||
ICNSTMP=`mktemp -t ardouricon`
|
ICNSTMP=`mktemp -t ardouricon`
|
||||||
@ -623,6 +625,8 @@ mkdir -p "$MNTPATH"
|
|||||||
|
|
||||||
TMPDMG="${TMPDMG}.dmg"
|
TMPDMG="${TMPDMG}.dmg"
|
||||||
|
|
||||||
|
trap "rm -rf $MNTPATH $TMPDMG ${TMPDMG}.dmg $ICNSTMP" EXIT
|
||||||
|
|
||||||
hdiutil create -megabytes $DMGMEGABYTES "$TMPDMG"
|
hdiutil create -megabytes $DMGMEGABYTES "$TMPDMG"
|
||||||
DiskDevice=$(hdid -nomount "$TMPDMG" | grep Apple_HFS | cut -f 1 -d ' ')
|
DiskDevice=$(hdid -nomount "$TMPDMG" | grep Apple_HFS | cut -f 1 -d ' ')
|
||||||
newfs_hfs -v "${VOLNAME}" "${DiskDevice}"
|
newfs_hfs -v "${VOLNAME}" "${DiskDevice}"
|
||||||
@ -673,6 +677,7 @@ EOF
|
|||||||
chmod -Rf go-w "${MNTPATH}"
|
chmod -Rf go-w "${MNTPATH}"
|
||||||
sync
|
sync
|
||||||
|
|
||||||
|
set -e
|
||||||
echo "compressing Image ..."
|
echo "compressing Image ..."
|
||||||
|
|
||||||
# Umount the image
|
# Umount the image
|
||||||
@ -680,9 +685,6 @@ umount "${DiskDevice}"
|
|||||||
hdiutil eject "${DiskDevice}"
|
hdiutil eject "${DiskDevice}"
|
||||||
# Create a read-only version, use zlib compression
|
# Create a read-only version, use zlib compression
|
||||||
hdiutil convert -format UDZO "${TMPDMG}" -imagekey zlib-level=9 -o "${UC_DMG}"
|
hdiutil convert -format UDZO "${TMPDMG}" -imagekey zlib-level=9 -o "${UC_DMG}"
|
||||||
# Delete the temporary files
|
|
||||||
rm "$TMPDMG"
|
|
||||||
rm -rf "$MNTPATH"
|
|
||||||
|
|
||||||
echo "setting file icon ..."
|
echo "setting file icon ..."
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user