From c96ef90c9321d669989ed0da28ea6bbb2ac49e2c Mon Sep 17 00:00:00 2001 From: tresf Date: Sat, 29 Aug 2015 23:03:23 -0400 Subject: [PATCH] Add Java version check warning to Apple installer --- ant/apple/apple-preinstall.sh.in | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ant/apple/apple-preinstall.sh.in b/ant/apple/apple-preinstall.sh.in index 043be65..9450c74 100644 --- a/ant/apple/apple-preinstall.sh.in +++ b/ant/apple/apple-preinstall.sh.in @@ -20,6 +20,10 @@ function check_java() { fi if [ $(echo "$curver>=$minver" | bc -l) -eq 0 ]; then + osascript -e "tell app \"Installer\" to display dialog \"Java $minver is required for installation.\nDownload it now?\"" + if [ $? -eq 0 ]; then + open "https://java.com/download/" + fi exit 1 fi } @@ -31,7 +35,7 @@ code=$? # Fallback on Internet Plug-Ins version if needed if [ $code -ne 0 ]; then check_java - code=0 + code=$? fi # Kill any running versions