aboutsummaryrefslogtreecommitdiffstats
path: root/deployment/zip
diff options
context:
space:
mode:
authorKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>2017-09-27 14:17:43 +0530
committerKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>2017-09-27 16:11:15 +0530
commiteeed87109a19fdf834fc77f8926f094ce29e6467 (patch)
tree2a97f1ff64de27c82087e1d6524145697f0b1bf0 /deployment/zip
parent4ddd05291cffd82b526d8347eb0d74bf61782f26 (diff)
Fix installer script to check for java existence
CLI-49 Change-Id: I2757180faa5b71c85cf81432006690d3a5637839 Signed-off-by: Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
Diffstat (limited to 'deployment/zip')
-rw-r--r--deployment/zip/installer/install.sh10
1 files changed, 9 insertions, 1 deletions
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