Created
February 14, 2015 07:02
-
-
Save opragel/b2c5819f1afa50ef1d88 to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
# Displays Oracle JRE version or N/A if not found | |
printf '<result>' | |
if [ -e /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java ]; then | |
result=$(defaults read /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Info.plist CFBundleVersion) | |
printf "%s" "$result" | |
else | |
printf 'N/A' | |
fi | |
printf '</result>' | |
#ea_display_name Oracle JRE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment