mirror of
https://github.com/jgm/pandoc.git
synced 2026-09-21 05:43:39 +08:00
OSX package: Check for 64-bit Intel CPU before installing.
This commit is contained in:
@@ -4,6 +4,7 @@ DIST=osx_package
|
||||
VERSION=$(grep -e '^Version' pandoc.cabal | awk '{print $2}')
|
||||
RESOURCES=$DIST/Resources
|
||||
ROOT=$DIST/pandoc
|
||||
SCRIPTS=osx-resources
|
||||
BASE=pandoc-$VERSION
|
||||
ME=jgm
|
||||
|
||||
@@ -36,6 +37,7 @@ $PACKAGEMAKER \
|
||||
--resources $RESOURCES \
|
||||
--version $VERSION \
|
||||
--no-relocate \
|
||||
--scripts $SCRIPTS \
|
||||
--out $BASE.pkg
|
||||
|
||||
echo Creating disk image...
|
||||
|
||||
Executable
+14
@@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
cputype=`sysctl -n hw.cputype`
|
||||
sixtyfourbit=`sysctl -n hw.cpu64bit_capable`
|
||||
|
||||
if [ "x$cputype" != "x7" ] # x86
|
||||
then
|
||||
exit 112
|
||||
fi
|
||||
|
||||
if [ "x$sixtyfourbit" != "x1" ] # 64 bit
|
||||
then
|
||||
exit 113
|
||||
fi
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
"16" = "This installer works only on Intel Macs.";
|
||||
"17" = "This installer requires a 64-bit processor.";
|
||||
|
||||
Reference in New Issue
Block a user