Last active
December 18, 2015 20:58
-
-
Save rtrouton/5843570 to your computer and use it in GitHub Desktop.
This Casper Extension Attribute determines if either of the the following Java builds are installed: 10.6.x: 1.6.0_51-b11-456-10M4508
10.7.x - 10.8.x: 1.6.0_51-b11-456-11M4508 These builds were installed by the first versions of Java for OS X 2013-004 and Java for Mac OS X 10.6 Update 16 and can cause problems for Java Swing applications like MA…
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 | |
# Determines if either of the following | |
# Java builds are installed: | |
# | |
# 10.6.x: 1.6.0_51-b11-456-10M4508 | |
# 10.7.x - 10.8.x: 1.6.0_51-b11-456-11M4508 | |
# | |
# This builds were installed by the first versions of | |
# Java for OS X 2013-004 and Java for Mac OS X 10.6 Update 16 | |
# and can cause problems for Java Swing applications | |
# like MATLAB and Papercut. | |
JAVA_BUILD_CHECK=`java -version 2>&1 | awk '/4508/{print $NF}' | sed '$s/.$//'` | |
FOUND=`echo "Installed"` | |
NOT_FOUND=`echo "Not Found"` | |
if [ "$JAVA_BUILD_CHECK" = "1.6.0_51-b11-456-10M4508" ]; then | |
result=$FOUND | |
elif [ "$JAVA_BUILD_CHECK" = "1.6.0_51-b11-456-11M4508" ]; then | |
result=$FOUND | |
elif [ "$JAVA_BUILD_CHECK" = "" ]; then | |
result=$NOT_FOUND | |
fi | |
# If either 1.6.0_51-b11-456-10M4508 or 1.6.0_51-b11-456-11M4508 | |
# is installed, an "Installed" message is displayed. | |
# | |
# If neither 1.6.0_51-b11-456-10M4508 or 1.6.0_51-b11-456-11M4508 | |
# is installed, a "Not Found" message is displayed. | |
echo "<result>$result</result>" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment