Last active
July 27, 2022 12:25
-
-
Save sgmills/7c6970b697235ee14b3ef0a871547604 to your computer and use it in GitHub Desktop.
This file contains 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/sh | |
# If cpu is Apple branded, use arch binary to check if x86_64 code can run | |
if [[ "$(sysctl -n machdep.cpu.brand_string)" == *'Apple'* ]]; then | |
if arch -x86_64 /usr/bin/true 2> /dev/null; then | |
result="Installed" | |
else | |
result="Missing" | |
fi | |
else | |
result="Ineligible" | |
fi | |
echo "<result>$result</result>" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment