Bug 305131, trouble with Mac l10n builds when unpacking dmg files. Harden dmg unpacking. r=bsmedberg

git-svn-id: svn://10.0.0.236/trunk@178618 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mark%moxienet.com 2005-08-22 18:35:41 +00:00
parent f8a877926f
commit 7c9dfaa8de

View File

@ -121,10 +121,12 @@ MAKE_PACKAGE = $(_ABS_TOPSRCDIR)/build/package/mac_osx/pkg-dmg \
UNMAKE_PACKAGE = \
set -e; \
unset NEXT_ROOT; \
export PAGER=true; \
mkdir mount-temp; \
hdiutil attach -readonly -mountpoint mount-temp -private -noautoopen $(UNPACKAGE) > hdi.output; \
DEV_NAME=`egrep '^/dev' < hdi.output | sed 1q | awk '{print $$1}'`; \
rsync -a mount-temp/$(_APPNAME) $(MOZ_PKG_APPNAME); \
echo Y | hdiutil attach -readonly -mountpoint mount-temp -private -noautoopen $(UNPACKAGE) > hdi.output; \
DEV_NAME=`sed -e 's/^.*\(\/dev\/disk[^ ]*\).*$$/\1/;1q' < hdi.output`; \
MOUNTPOINT=`perl -n -e 'split(/\/dev\/disk[^ ]*/,$$_,2);if($$_[1]=~/(\/.*)/) {print $$1."\n";}'< hdi.output`; \
rsync -a $${MOUNTPOINT}/$(_APPNAME) $(MOZ_PKG_APPNAME); \
hdiutil detach $${DEV_NAME}; \
$(NULL)
endif