Last active
December 8, 2022 12:10
-
-
Save ccnokes/af3a1fe7434e284650693787f99d4e1c to your computer and use it in GitHub Desktop.
Bash script that checks for apps that use Electron. Detailed a bit more here: https://cameronnokes.com/blog/how-to-know-if-a-desktop-app-uses-electron/
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/bash | |
target="${1:-/Applications}" | |
check() { | |
stat "$1/Contents/Frameworks/Electron Framework.framework" &> /dev/null | |
if [[ $? = 0 ]]; then | |
echo "$1 uses Electron" | |
fi | |
} | |
export -f check | |
find "$target" -maxdepth 2 -type d -name "*.app" -exec bash -c 'check "{}"' \; | |
# give this script executable permissions (chmod +x), then run. By default it'll check /Applications |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for the suggestion darzo! I just made
/Applications
the default. Should have done that from the outset.