From a760105972b0630bd6bf9dd746692087702f2a14 Mon Sep 17 00:00:00 2001
From: =?utf8?q?Roland=20H=C3=A4der?= <haeder@ambroox.de>
Date: Thu, 6 Feb 2020 13:19:20 +0100
Subject: [PATCH] Fixes: - put all strings in double quotes - all variables are
 ${FOO} for being more shell-standard - OpenJDK 8 is really okay here, 7 is by
 far to old - Midnight Commander is a very powerful program, including an
 editor
MIME-Version: 1.0
Content-Type: text/plain; charset=utf8
Content-Transfer-Encoding: 8bit

Signed-off-by: Roland Häder <haeder@ambroox.de>
---
 provision.sh | 34 ++++++++++++++++++----------------
 1 file changed, 18 insertions(+), 16 deletions(-)

diff --git a/provision.sh b/provision.sh
index 660938d..0e3a284 100755
--- a/provision.sh
+++ b/provision.sh
@@ -18,17 +18,18 @@ PAYARA_HOME="/opt/payara/payara-${PAYARA_VERSION}"
 case "${PAYARA_VERSION}" in 
 	4.1.2.181)
 		# The below links are to 4.1.2.181
-		FULL=https://search.maven.org/remotecontent?filepath=fish/payara/distributions/payara/4.1.2.181/payara-4.1.2.181.zip
-		WEB=https://search.maven.org/remotecontent?filepath=fish/payara/blue/distributions/payara-web/4.1.2.181/payara-web-4.1.2.181.zip
-		MINIMAL=
-		MICRO=
-		EMBEDDED_FULL=
-		EMBEDDED_WEB=
-		MULTI_LANGUAGE_FULL=https://search.maven.org/remotecontent?filepath=fish/payara/distributions/payara-ml/4.1.2.181/payara-ml-4.1.2.181.zip
-		MULTI_LANGUAGE_WEB=https://search.maven.org/remotecontent?filepath=fish/payara/distributions/payara-web-ml/4.1.2.181/payara-web-ml-4.1.2.181.zip
+		FULL="https://search.maven.org/remotecontent?filepath=fish/payara/distributions/payara/4.1.2.181/payara-4.1.2.181.zip"
+		WEB="https://search.maven.org/remotecontent?filepath=fish/payara/blue/distributions/payara-web/4.1.2.181/payara-web-4.1.2.181.zip"
+		MINIMAL=""
+		MICRO=""
+		EMBEDDED_FULL=""
+		EMBEDDED_WEB=""
+		MULTI_LANGUAGE_FULL="https://search.maven.org/remotecontent?filepath=fish/payara/distributions/payara-ml/4.1.2.181/payara-ml-4.1.2.181.zip"
+		MULTI_LANGUAGE_WEB="https://search.maven.org/remotecontent?filepath=fish/payara/distributions/payara-web-ml/4.1.2.181/payara-web-ml-4.1.2.181.zip"
 	;;
-	\*)
-		echo "unknown version number"
+
+\*)
+	echo "unknown version number '${PAYARA_VERSION}'"
 esac
 
 # Payara edition (Full, Web, Micro, etc., from above list)
@@ -74,14 +75,15 @@ installOracleJDK8() {
 # Download and unzip to /opt/payara
 installPayara() {
 	echo "Provisioning Payara-${PAYARA_VERSION} ${PAYARA_ED} to ${PAYARA_HOME}"
-	
-	echo "running update..."
+
+	echo "Running update..."
 	sudo apt-get -qqy update                      # Update the repos 
-	
-	echo "installing openjdk and unzip"
-	sudo apt-get -qqy install openjdk-7-jdk       # Install JDK 7 
+
+	echo "Installing openjdk and unzip"
+	sudo apt-get -qqy install openjdk-8-jdk       # Install JDK 8
 	sudo apt-get -qqy install unzip               # Install unzip 
-	
+	sudo apt-get -qqy install mc                  # Install Midnight Commander
+
 	echo "Downloading Payara ${PAYARA_VERSION}"
 	wget -q ${PAYARA_ED} -O temp.zip > /dev/null    # Download Payara 
 	sudo mkdir -p ${PAYARA_HOME}                    # Make dirs for Payara 
-- 
2.39.5