Commit 79465419 authored by Felix Paul Kühne's avatar Felix Paul Kühne

extras/macosx: add buildbot option to the packaging script, so it no longer...

extras/macosx: add buildbot option to the packaging script, so it no longer fails without window server
parent ebe759fc
...@@ -8,6 +8,19 @@ info() ...@@ -8,6 +8,19 @@ info()
echo "[${green}build${normal}] $1" echo "[${green}build${normal}] $1"
} }
BUILDBOT=no
usage()
{
cat << EOF
usage: $0 [options]
OPTIONS
-h Show this help
-b Enable buildbot mode (if you don't have a window server)
EOF
}
spushd() spushd()
{ {
pushd "$1" > /dev/null pushd "$1" > /dev/null
...@@ -18,6 +31,19 @@ spopd() ...@@ -18,6 +31,19 @@ spopd()
popd > /dev/null popd > /dev/null
} }
while getopts "hb" OPTION
do
case $OPTION in
h)
usage
exit 1
;;
b)
BUILDBOT=yes
;;
esac
done
out="/dev/null" out="/dev/null"
npapiroot=`dirname $0`/../.. npapiroot=`dirname $0`/../..
...@@ -50,10 +76,12 @@ info "Creating disk-image" ...@@ -50,10 +76,12 @@ info "Creating disk-image"
hdiutil create -srcfolder ${npapiroot}/"${DMGFOLDERNAME}" "${npapiroot}/${DMGITEMNAME}-rw.dmg" -scrub -format UDRW hdiutil create -srcfolder ${npapiroot}/"${DMGFOLDERNAME}" "${npapiroot}/${DMGITEMNAME}-rw.dmg" -scrub -format UDRW
mkdir -p ./mount mkdir -p ./mount
info "Moving file icons around" if [ "$BUILDBOT" = "no" ]; then
hdiutil attach -readwrite -noverify -noautoopen -mountRoot ./mount ${DMGITEMNAME}-rw.dmg info "Moving file icons around"
-osascript "${npapiroot}"/extras/macosx/dmg_setup.scpt "${DMGFOLDERNAME}" hdiutil attach -readwrite -noverify -noautoopen -mountRoot ./mount ${DMGITEMNAME}-rw.dmg
hdiutil detach ./mount/"${DMGFOLDERNAME}" osascript "${npapiroot}"/extras/macosx/dmg_setup.scpt "${DMGFOLDERNAME}"
hdiutil detach ./mount/"${DMGFOLDERNAME}"
fi
info "Compressing disk-image" info "Compressing disk-image"
rm -f ${DMGITEMNAME}.dmg rm -f ${DMGITEMNAME}.dmg
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment