4SANDBOX=`pwd`/.cabal-sandbox
5VERSION=$(grep -e '^Version' pandoc.cabal | awk '{print $2}')
6RESOURCES=$DIST/Resources
10SCRIPTS=$OSX/osx-resources
13CODESIGNID="Developer ID Application: John Macfarlane"
14PACKAGEMAKER=/Applications/PackageMaker.app/Contents/MacOS/PackageMaker
15EXES="pandoc pandoc-citeproc"
17read -s -p "sudo password: " PASSWORD
18echo $PASSWORD | sudo -S echo "Password valid, continuing."
20echo Removing old files...
28echo Building pandoc...
30# Use cpphs to avoid problems with clang cpp on ghc 7.8 osx:
31cabal install cpphs alex happy hsb2hs
32cabal install --reinstall --flags="embed_data_files" --ghc-options '-pgmPcpphs -optP--cpp'
33cabal install --reinstall --flags="embed_data_files" pandoc-citeproc --ghc-options '-pgmPcpphs -optP--cpp'
36mkdir -p $DEST/share/man/man1
37mkdir -p $DEST/share/man/man5
39 cp $SANDBOX/bin/$f $DEST/bin/;
40 cp $SANDBOX/share/man/man1/$f.1 $DEST/share/man/man1/
42cp $SANDBOX/share/man/man5/pandoc_markdown.5 $DEST/share/man/man5/
43cp $OSX/uninstall-pandoc.pl $DEST/bin/
45chown -R $ME:staff $DIST
46# gzip $DEST/share/man/man?/*.*
47# cabal gives man pages the wrong permissions
48chmod +r $DEST/share/man/man?/*.*
50echo Copying license...
51$SANDBOX/bin/pandoc --data data -t rtf -s COPYING -o $RESOURCES/License.rtf
53echo Signing pandoc executable...
55codesign --force --sign "$CODESIGNID" $DEST/bin/pandoc
56# make sure it's valid... returns nonzero exit code if it isn't:
57spctl --assess --type execute $DEST/bin/pandoc
59echo Creating OSX package...
60# remove old package first
61echo $PASSWORD | sudo -S rm -rf $BASE.pkg $BASE.dmg
65 --id net.johnmacfarlane.pandoc \
66 --resources $RESOURCES \
73echo Signing package...
75sudo codesign --force --sign "$CODESIGNID" $BASE.pkg
76# make sure it's valid...
77spctl --assess --type install $BASE.pkg
80zip -9 -r $BASE.pkg.zip $BASE.pkg
82# echo Creating disk image...
83# sudo hdiutil create "$BASE.dmg" \
85# -volname "pandoc $VERSION" \
87# sudo hdiutil internet-enable "$BASE.dmg"
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list