aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>2017-09-27 14:13:28 +0530
committerKanagaraj Manickam <kanagaraj.manickam@huawei.com>2017-09-27 12:26:30 +0000
commit91aa70cdcd5bbb832c8562d559ef9c6a074e155b (patch)
tree8c6703c0c5675e221ef2d43b3433ac004c1c1601
parent81206ecb7940980a43d95c98231cd2323836a01f (diff)
Fix cli install script to check for java existance
CLI-49 Change-Id: I517d0ebf12a41bffb9626ca5857bc23e551e376f Signed-off-by: Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
-rw-r--r--boot/cli_install.sh10
1 files changed, 9 insertions, 1 deletions
diff --git a/boot/cli_install.sh b/boot/cli_install.sh
index 57f0edc6..77400148 100644
--- a/boot/cli_install.sh
+++ b/boot/cli_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 openjdk-8-jre
+fi
+
wget -O $CLI_ZIP $CLI_LATEST_BINARY
unzip $CLI_ZIP