collect the version numbers of browsers
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/zsh | |
APP_PATH="/Applications/" | |
INFO_PATH=".app/Contents/Info.plist" | |
browsers=("Safari Technology Preview" "Firefox Nightly" "Google Chrome Canary" "Safari" "Firefox" "Google Chrome" "Microsoft Edge Canary") | |
for browser_name in ${(@k)browsers}; do | |
full_path="${APP_PATH}${browser_name}${INFO_PATH}" ; | |
if test -f "$full_path"; then | |
browser_version=$(defaults read "$full_path" CFBundleShortVersionString); | |
echo "${browser_name} ${browser_version}"; | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The result will be something like: