3LOCALBIN=$HOME/.local/bin
5VERSION=$(grep -e '^Version' pandoc.cabal | awk '{print $2}')
6RESOURCES=$DIST/Resources
10SCRIPTS=$OSX/osx-resources
13PACKAGEMAKER=/Applications/PackageMaker.app/Contents/MacOS/PackageMaker
14DEVELOPER_ID_APPLICATION=${DEVELOPER_ID_APPLICATION:-Developer ID Application: John Macfarlane}
15DEVELOPER_ID_INSTALLER=${DEVELOPER_ID_INSTALLER:-Developer ID Installer: John Macfarlane}
17# We need this for hsb2hs:
19export MACOSX_DEPLOYMENT_TARGET=10.7
21# echo Removing old files...
26which hsb2hs || stack install --stack-yaml=stack.hsb2hs.yaml
28echo Building pandoc...
30stack install --stack-yaml=osx/stack.yaml
32echo Getting man pages...
35# get pandoc-citeproc man page:
36PANDOC_CITEPROC_VERSION=`pandoc-citeproc --version | awk '{print $2;}'`
37PANDOC_CITEPROC_TARBALL=https://hackage.haskell.org/package/pandoc-citeproc-${PANDOC_CITEPROC_VERSION}/pandoc-citeproc-${PANDOC_CITEPROC_VERSION}.tar.gz
38curl ${PANDOC_CITEPROC_TARBALL} | tar xzC $DIST
39PANDOC_CITEPROC_PATH=$DIST/pandoc-citeproc-${PANDOC_CITEPROC_VERSION}
42mkdir -p $DEST/share/man/man1
43for f in pandoc pandoc-citeproc; do
44 cp $LOCALBIN/$f $DEST/bin/;
46cp $PANDOC_CITEPROC_PATH/man/man1/pandoc-citeproc.1 $DEST/share/man/man1/
47cp man/pandoc.1 $DEST/share/man/man1/
49chown -R $ME:staff $DIST
51echo Copying license...
52$LOCALBIN/pandoc --data data -t html5 -s COPYING -o $RESOURCES/license.html
54echo Signing pandoc executable...
56codesign --force --sign "${DEVELOPER_ID_APPLICATION}" $DEST/bin/pandoc
57# make sure it's valid... returns nonzero exit code if it isn't:
58spctl --assess --type execute $DEST/bin/pandoc
60echo Creating OSX package...
61# remove old package first
64sed -e "s/PANDOCVERSION/$VERSION/" osx/distribution.xml.in > osx/distribution.xml
66pkgbuild --root $DIST/pandoc --identifier net.johnmacfarlane.pandoc --version 1.13 --ownership recommended $DIST/pandoc.pkg
67productbuild --distribution osx/distribution.xml --resources $DIST/Resources --package-path $DIST --version $VERSION --sign "${DEVELOPER_ID_INSTALLER}" $BASE-osx.pkg
70spctl --assess --type install $BASE-osx.pkg
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