path: root/
diff options
authorJohn MacFarlane <>2014-05-12 19:59:44 -0700
committerJohn MacFarlane <>2014-05-12 19:59:44 -0700
commit1e8cd2c27755bac4086489e9a6eed19bf4d72d45 (patch)
treebcd1f56a06213753d5855cf4c591bd80001c27a8 /
parent77b2589d3f10f988ddf6804dee401112057f5a17 (diff)
Moved osx package stuff to osx directory; added uninstall script.
Thanks to Daniel T. Staal for an uninstall script from which this one is modified.
Diffstat (limited to '')
1 files changed, 0 insertions, 86 deletions
diff --git a/ b/
deleted file mode 100755
index 3119f140e..000000000
--- a/
+++ /dev/null
@@ -1,86 +0,0 @@
-#!/bin/bash -e
-VERSION=$(grep -e '^Version' pandoc.cabal | awk '{print $2}')
-CODESIGNID="Developer ID Application: John Macfarlane"
-EXES="pandoc pandoc-citeproc"
-read -s -p "sudo password: " PASSWORD
-echo $PASSWORD | sudo -S echo "Password valid, continuing."
-echo Removing old files...
-rm -rf $DIST
-mkdir -p $RESOURCES
-cabal sandbox init
-echo Updating database
-cabal update
-echo Building pandoc...
-cabal clean
-# Use cpphs to avoid problems with clang cpp on ghc 7.8 osx:
-cabal install cpphs alex happy hsb2hs
-cabal install --reinstall --flags="embed_data_files" --ghc-options '-pgmPcpphs -optP--cpp'
-cabal install --reinstall --flags="embed_data_files" pandoc-citeproc --ghc-options '-pgmPcpphs -optP--cpp'
-mkdir -p $DEST/bin
-mkdir -p $DEST/share/man/man1
-mkdir -p $DEST/share/man/man5
-for f in $EXES; do
- cp $SANDBOX/bin/$f $DEST/bin/;
- cp $SANDBOX/share/man/man1/$f.1 $DEST/share/man/man1/
-cp $SANDBOX/share/man/man5/pandoc_markdown.5 $DEST/share/man/man5/
-chown -R $ME:staff $DIST
-# gzip $DEST/share/man/man?/*.*
-# cabal gives man pages the wrong permissions
-chmod +r $DEST/share/man/man?/*.*
-echo Copying license...
-$SANDBOX/bin/pandoc --data data -t rtf -s COPYING -o $RESOURCES/License.rtf
-echo Signing pandoc executable...
-codesign --force --sign "$CODESIGNID" $DEST/bin/pandoc
-# make sure it's valid... returns nonzero exit code if it isn't:
-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
- --root $ROOT \
- --id net.johnmacfarlane.pandoc \
- --resources $RESOURCES \
- --version $VERSION \
- --scripts $SCRIPTS \
- --out $BASE.pkg
- # --no-relocate
-echo Signing package...
-sudo codesign --force --sign "$CODESIGNID" $BASE.pkg
-# make sure it's valid...
-spctl --assess --type install $BASE.pkg
-echo Creating zip...
-zip -9 -r $ $BASE.pkg
-# echo Creating disk image...
-# sudo hdiutil create "$BASE.dmg" \
-# -format UDZO -ov \
-# -volname "pandoc $VERSION" \
-# -srcfolder $BASE.pkg
-# sudo hdiutil internet-enable "$BASE.dmg"