Change-Id: Ifdf2d839674f63018682ea0c45c84c468b099722
Signed-off-by: Gilles Thouenon <gilles.thouenon@orange.com>
#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"