From: Gilles Thouenon Date: Wed, 31 Jul 2024 08:30:38 +0000 (+0200) Subject: Fix shellcheck in installMavenUbuntu script X-Git-Tag: 10.0.0~13 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=43c66f6c1c5deecf2846505d022a52ba13555697;p=transportpce.git Fix shellcheck in installMavenUbuntu script Change-Id: Ifdf2d839674f63018682ea0c45c84c468b099722 Signed-off-by: Gilles Thouenon --- diff --git a/tests/installMavenUbuntu.sh b/tests/installMavenUbuntu.sh index 86acea047..3f87a9107 100755 --- a/tests/installMavenUbuntu.sh +++ b/tests/installMavenUbuntu.sh @@ -8,10 +8,10 @@ update-java-alternatives -l #select JAVA-21 sudo update-java-alternatives -s java-1.21.0-openjdk-amd64 JAVA_VER=$(java -version 2>&1 | sed -n ';s/.* version "\(.*\)\.\(.*\)\..*".*$/\1/p;') -echo $JAVA_VER +echo "$JAVA_VER" JAVAC_VER=$(javac -version 2>&1 | sed -n ';s/javac \(.*\)\.\(.*\)\..*.*$/\1/p;') -echo $JAVAC_VER -if [ "$JAVA_VER" -ge 21 -a "$JAVAC_VER" -ge 21 ];then +echo "$JAVAC_VER" +if [ "$JAVA_VER" -ge 21 ] && [ "$JAVAC_VER" -ge 21 ];then echo "ok, java is 21 or newer" else echo "No java21 or newer available"