Created
July 11, 2014 17:48
-
-
Save triti/877099349c3e329c1fed to your computer and use it in GitHub Desktop.
Absolute Manage custom info field to detect if the EFI is 64 bit capable or not.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# EFI Is 64-bit | |
# Useful for detecting if a Mac is Mountain Lion/Mavericks/Yosemite compatible or not. | |
# https://gist.github.com/877099349c3e329c1fed | |
readonly FIRMWARE_ABI="$(/usr/sbin/ioreg -w0 -l -p IODeviceTree | /usr/bin/grep firmware-abi)" | |
case "${FIRMWARE_ABI}" in | |
*EFI32* ) printf 'No\n' ;; | |
*EFI64* ) printf 'Yes\n' ;; | |
* ) exit 1 ;; | |
esac | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment