summaryrefslogtreecommitdiff
path: root/make_osx_package.sh
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2013-12-08 10:30:14 -0800
committerJohn MacFarlane <fiddlosopher@gmail.com>2013-12-08 10:30:14 -0800
commitfcc94c788bc6f021da4df0f2e80ed4cff577d9a2 (patch)
tree5dae0addfe6d964049b641b8a999d56995039a40 /make_osx_package.sh
parent8e255fad98baf2448d8c1866d7c03c5d110a505f (diff)
OSX package: Create .zip rather than .dmg.
Diffstat (limited to 'make_osx_package.sh')
-rwxr-xr-xmake_osx_package.sh21
1 files changed, 14 insertions, 7 deletions
diff --git a/make_osx_package.sh b/make_osx_package.sh
index a4eb404f0..384cb89cc 100755
--- a/make_osx_package.sh
+++ b/make_osx_package.sh
@@ -1,4 +1,4 @@
-#!/bin/sh -e
+#!/bin/bash -e
DIST=`pwd`/osx_package
SANDBOX=`pwd`/.cabal-sandbox
@@ -13,6 +13,9 @@ CODESIGNID="Developer ID Application: John Macfarlane"
PACKAGEMAKER=/Applications/PackageMaker.app/Contents/MacOS/PackageMaker
EXES="pandoc pandoc-citeproc biblio2yaml"
+read -s -p "sudo password: " PASSWORD
+echo $PASSWORD | sudo -S echo "Password valid, continuing."
+
echo Removing old files...
rm -rf $DIST
mkdir -p $RESOURCES
@@ -50,6 +53,8 @@ codesign --force --sign "$CODESIGNID" $DEST/bin/pandoc
spctl --assess --type execute $DEST/bin/pandoc
echo Creating OSX package...
+# remove old package first
+echo $PASSWORD | sudo -S rm -rf $BASE.pkg $BASE.dmg
sudo $PACKAGEMAKER \
--root $ROOT \
@@ -67,11 +72,13 @@ sudo codesign --force --sign "$CODESIGNID" $BASE.pkg
# make sure it's valid...
spctl --assess --type install $BASE.pkg
-echo Creating disk image...
+echo Creating zip...
+zip -9 -r $BASE.pkg.zip $BASE.pkg
-sudo hdiutil create "$BASE.dmg" \
- -format UDZO -ov \
- -volname "pandoc $VERSION" \
- -srcfolder $BASE.pkg
-sudo hdiutil internet-enable "$BASE.dmg"
+# echo Creating disk image...
+# sudo hdiutil create "$BASE.dmg" \
+# -format UDZO -ov \
+# -volname "pandoc $VERSION" \
+# -srcfolder $BASE.pkg
+# sudo hdiutil internet-enable "$BASE.dmg"