From 949a6b9d1eaa7ff72a6aa78e6074fc4d3ba91e2c Mon Sep 17 00:00:00 2001 From: Brooke Kuhlmann Date: Sat, 29 Apr 2017 07:44:50 -0600 Subject: [PATCH] Fixed Java SE Development Kit install. - Oracle makes it difficult to download the Java SE Development Kit as an offline download because the license must be accepted first. The JDK is important to have installed as several Homebrew apps require it to exist first. - This provides a prompt for checking that the Java SE Development Kit has been installed before proceeding as the original way of installing it assumed you had visited the Oracle web site and accepted the license. --- bin/install_dev_tools | 15 +++++++++++---- lib/settings.sh | 4 ++-- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/bin/install_dev_tools b/bin/install_dev_tools index 79b64db..ade9667 100755 --- a/bin/install_dev_tools +++ b/bin/install_dev_tools @@ -6,11 +6,18 @@ printf "Installing Xcode CLI tools...\n" xcode-select --install -read -p "Have you completed the Xcode CLI tools install (y/n)? " response -if [[ "$response" != "y" ]]; then +read -p "Have you completed the Xcode CLI tools install (y/n)? " xcode_response +if [[ "$xcode_response" != "y" ]]; then printf "ERROR: Xcode CLI tools must be installed before proceeding.\n" exit 1 fi -printf "Installing Java...\n" -install_java "$JAVA_URL" "$JAVA_VOLUME_NAME" +printf "Installing $JAVA_LABEL...\n" +printf "%s\n" "You must manually accept the license and download the $JAVA_LABEL: $JAVA_DOWNLOAD_URL." +open $JAVA_DOWNLOAD_URL + +read -p "Have you completed the $JAVA_LABEL install (y/n)? " java_response +if [[ "$java_response" != "y" ]]; then + printf "ERROR: $JAVA_LABEL must be installed before proceeding.\n" + exit 1 +fi diff --git a/lib/settings.sh b/lib/settings.sh index 7e08408..116c200 100644 --- a/lib/settings.sh +++ b/lib/settings.sh @@ -18,5 +18,5 @@ export MAC_OS_WORK_PATH=/tmp/downloads export MAC_OS_CONFIG_PATH="../mac_os-config" # Java -export JAVA_VOLUME_NAME="JDK 8 Update 101" -export JAVA_URL="http://download.oracle.com/otn-pub/java/jdk/8u101-b13/jdk-8u101-macosx-x64.dmg" +export JAVA_LABEL="Java SE Development Kit" +export JAVA_DOWNLOAD_URL="http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html"