aboutsummaryrefslogtreecommitdiff
path: root/macos
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2017-10-22 14:22:53 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2017-10-22 14:22:53 -0700
commit6eb604095d991e6fb20844245695c4c2f0cb606b (patch)
tree3ef37e3a482ef8efa3497836b98c86c7eba03727 /macos
parent4aa84f40060884311324d3dd0a81ec22fdd9329f (diff)
downloadpandoc-6eb604095d991e6fb20844245695c4c2f0cb606b.tar.gz
Fixed detection of VERSION in make_macos_package.sh.
This broke when we uncapitalized cabal fields! Now we get this from `pandoc --version`.
Diffstat (limited to 'macos')
-rwxr-xr-xmacos/make_macos_package.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/macos/make_macos_package.sh b/macos/make_macos_package.sh
index 5b66afd25..7cdc42e0c 100755
--- a/macos/make_macos_package.sh
+++ b/macos/make_macos_package.sh
@@ -3,13 +3,11 @@
LOCALBIN=$HOME/.local/bin
DIST=`pwd`/macos_package
MACOS=`pwd`/macos
-VERSION=$(grep -e '^Version' pandoc.cabal | awk '{print $2}')
RESOURCES=$DIST/Resources
ROOT=$DIST/pandoc
DEST=$ROOT/usr/local
PANDOC=$DEST/bin/pandoc
SCRIPTS=$MACOS/macos-resources
-BASE=pandoc-$VERSION
ME=$(whoami)
PACKAGEMAKER=/Applications/PackageMaker.app/Contents/MacOS/PackageMaker
DEVELOPER_ID_APPLICATION=${DEVELOPER_ID_APPLICATION:-Developer ID Application: John Macfarlane}
@@ -37,7 +35,7 @@ echo Getting man pages...
make man/pandoc.1
# get pandoc-citeproc man page:
-PANDOC_CITEPROC_VERSION=`pandoc-citeproc --version | awk '{print $2;}'`
+PANDOC_CITEPROC_VERSION=`$DEST/bin/pandoc-citeproc --version | awk '{print $2;exit;}'`
PANDOC_CITEPROC_TARBALL=https://hackage.haskell.org/package/pandoc-citeproc-${PANDOC_CITEPROC_VERSION}/pandoc-citeproc-${PANDOC_CITEPROC_VERSION}.tar.gz
curl ${PANDOC_CITEPROC_TARBALL} | tar xzC $DIST
PANDOC_CITEPROC_PATH=$DIST/pandoc-citeproc-${PANDOC_CITEPROC_VERSION}
@@ -61,6 +59,9 @@ $PANDOC --data data -t html5 -s COPYING.md -Vpagetitle="License" -o $RESOURCES/l
echo Creating macOS package...
+VERSION=`$DEST/bin/pandoc --version | awk '{print $2;exit;}'`
+BASE=pandoc-$VERSION
+
sed -e "s/PANDOCVERSION/$VERSION/" $MACOS/distribution.xml.in > $MACOS/distribution.xml
pkgbuild --root $ROOT --identifier net.johnmacfarlane.pandoc --version $VERSION --ownership recommended $DIST/pandoc.pkg