diff options
author | John MacFarlane <fiddlosopher@gmail.com> | 2012-03-09 13:07:26 -0800 |
---|---|---|
committer | John MacFarlane <fiddlosopher@gmail.com> | 2012-03-09 13:07:26 -0800 |
commit | 0d095be64f189def9324a1b323f0943d90224eb1 (patch) | |
tree | a4f140ca59d71a0cb965561b52c317e66563983c /osx-resources | |
parent | 5fe63436c8e048798eca0b44f6bae031ef011fb7 (diff) |
OSX package: Check for 64-bit Intel CPU before installing.
Diffstat (limited to 'osx-resources')
-rwxr-xr-x | osx-resources/InstallationCheck | 14 | ||||
-rw-r--r-- | osx-resources/InstallationCheck.strings | 3 |
2 files changed, 17 insertions, 0 deletions
diff --git a/osx-resources/InstallationCheck b/osx-resources/InstallationCheck new file mode 100755 index 000000000..4149b4c31 --- /dev/null +++ b/osx-resources/InstallationCheck @@ -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 + diff --git a/osx-resources/InstallationCheck.strings b/osx-resources/InstallationCheck.strings new file mode 100644 index 000000000..6c8efe0d4 --- /dev/null +++ b/osx-resources/InstallationCheck.strings @@ -0,0 +1,3 @@ +"16" = "This installer works only on Intel Macs."; +"17" = "This installer requires a 64-bit processor."; + |