git.iko.soy/typeable/pandoc
on master help sign in
OSX package: Check for 64-bit Intel CPU before installing.
commit0d095be64f189def9324a1b323f0943d90224eb1 authorJohn MacFarlane <fiddlosopher@gmail.com> dateFri 9 Mar 2012, 13:07 (15 years ago) parent5fe6343
3 files changed+19
make_osx_package.sh+2 osx-resources/InstallationCheck+14 osx-resources/InstallationCheck.strings+3
make_osx_package.sh+2
@@ -4,6 +4,7 @@ DIST=osx_package
44VERSION=$(grep -e '^Version' pandoc.cabal | awk '{print $2}')
55RESOURCES=$DIST/Resources
66ROOT=$DIST/pandoc
7+SCRIPTS=osx-resources
78BASE=pandoc-$VERSION
89ME=jgm
910
@@ -36,6 +37,7 @@ $PACKAGEMAKER \
3637 --resources $RESOURCES \
3738 --version $VERSION \
3839 --no-relocate \
40+ --scripts $SCRIPTS \
3941 --out $BASE.pkg
4042
4143echo Creating disk image...
osx-resources/InstallationChecknew file+14
@@ -0,0 +1,14 @@
1+#!/bin/sh
2+cputype=`sysctl -n hw.cputype`
3+sixtyfourbit=`sysctl -n hw.cpu64bit_capable`
4+
5+if [ "x$cputype" != "x7" ] # x86
6+then
7+ exit 112
8+fi
9+
10+if [ "x$sixtyfourbit" != "x1" ] # 64 bit
11+then
12+ exit 113
13+fi
14+
osx-resources/InstallationCheck.stringsnew file+3
@@ -0,0 +1,3 @@
1+"16" = "This installer works only on Intel Macs.";
2+"17" = "This installer requires a 64-bit processor.";
3+