Last active
March 1, 2021 14:46
-
-
Save mahdyar/e72758d4a7a850cb001e75b5b0c5f143 to your computer and use it in GitHub Desktop.
Detect which apps are running under Rosetta2 or native on Apple Silicon M1.
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
for appFolder in /Applications/*/ ; do | |
cd "$appFolder/Contents/MacOS/" 2> /dev/null | |
if [[ "$?" != 0 ]]; then continue; fi | |
for file in * ; do | |
if [ ! -d "$file" ] && [[ $file != *"."* ]]; then | |
architecture=$(file "$file") | |
if [[ $architecture != *"arm64"* ]]; then | |
echo "\"$file\" doesn't support arm64." | |
fi | |
fi | |
done | |
done | |
echo "\nMade with <3 by mahdyar.me" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It can be run simply with curl:
or:
also, it can be downloaded and run manually: