From eeed87109a19fdf834fc77f8926f094ce29e6467 Mon Sep 17 00:00:00 2001 From: Kanagaraj Manickam k00365106 Date: Wed, 27 Sep 2017 14:17:43 +0530 Subject: Fix installer script to check for java existence CLI-49 Change-Id: I2757180faa5b71c85cf81432006690d3a5637839 Signed-off-by: Kanagaraj Manickam k00365106 --- deployment/zip/installer/install.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'deployment/zip') diff --git a/deployment/zip/installer/install.sh b/deployment/zip/installer/install.sh index 57f0edc6..d167a1a5 100644 --- a/deployment/zip/installer/install.sh +++ b/deployment/zip/installer/install.sh @@ -33,7 +33,15 @@ mkdir -p $CLI_INSTALL_DIR cd $CLI_INSTALL_DIR #Download and unzip CLI -apt-get install -y wget unzip openjdk-8-jre +apt-get install -y wget unzip + +#check for java +java -version +if [ $? == 127 ] +then + apt-get install -y openjdk-8-jre +fi + wget -O $CLI_ZIP $CLI_LATEST_BINARY unzip $CLI_ZIP -- cgit 1.2.3-korg