Skip to content

Instantly share code, notes, and snippets.

@triti
Created July 11, 2014 17:48
Show Gist options
  • Save triti/877099349c3e329c1fed to your computer and use it in GitHub Desktop.
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.
#!/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