osx: add support for dumping built dmg into OUTPUTDIR stable
authorAugie Fackler <augie@google.com>
Mon, 18 Apr 2016 23:57:22 -0400
branchstable
changeset 29023 e2a553ae1edc
parent 29022 d78e00e4be7c
child 29024 fe364d8797c3
osx: add support for dumping built dmg into OUTPUTDIR
Makefile
--- a/Makefile	Mon Apr 18 23:55:58 2016 -0400
+++ b/Makefile	Mon Apr 18 23:57:22 2016 -0400
@@ -161,8 +161,11 @@
 	rm -rf dist/mercurial-*.mpkg
 	python -m bdist_mpkg.script_bdist_mpkg setup.py --
 	python contrib/fixpax.py dist/mercurial-*.mpkg/Contents/Packages/*.pkg/Contents/Archive.pax.gz
-	mkdir -p packages/osx
-	N=`cd dist && echo mercurial-*.mpkg | sed 's,\.mpkg$$,,'` && hdiutil create -srcfolder dist/$$N.mpkg/ -scrub -volname "$$N" -ov packages/osx/$$N.dmg
+	OUTPUTDIR=$${OUTPUTDIR:=packages/osx} && \
+	  mkdir -p $$OUTPUTDIR && \
+	  N=`cd dist && echo mercurial-*.mpkg | sed 's,\.mpkg$$,,'` && \
+	  hdiutil create -srcfolder dist/$$N.mpkg/ -scrub -volname "$$N" \
+	    -ov $$OUTPUTDIR/$$N.dmg
 	rm -rf dist/mercurial-*.mpkg
 
 deb: