From 6eb604095d991e6fb20844245695c4c2f0cb606b Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sun, 22 Oct 2017 14:22:53 -0700 Subject: Fixed detection of VERSION in make_macos_package.sh. This broke when we uncapitalized cabal fields! Now we get this from `pandoc --version`. --- macos/make_macos_package.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'macos') 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 -- cgit v1.2.3