diff options
author | Sven Gothel <[email protected]> | 2022-04-24 05:27:04 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2022-04-24 05:27:04 +0200 |
commit | 7c9b5244304340f43534adb2d5288ed41c3a00e4 (patch) | |
tree | 7e4ec7fc8625c18cc2c061ee0586ee67dca8c6b2 /scripts/run-java-trial.sh | |
parent | 11405d3dd3df0dab041972ff5c25d2fb6e97aeb1 (diff) |
build scripts: Only use OpenJDK 17 if available (Not available on Debian 10)
Diffstat (limited to 'scripts/run-java-trial.sh')
-rwxr-xr-x | scripts/run-java-trial.sh | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/scripts/run-java-trial.sh b/scripts/run-java-trial.sh index 46750593..1033ed34 100755 --- a/scripts/run-java-trial.sh +++ b/scripts/run-java-trial.sh @@ -7,7 +7,11 @@ bname=`basename $0 .sh` . $sdir/setup-machine-arch.sh -export JAVA_HOME=/usr/lib/jvm/java-17-openjdk-$archabi +if [ -e /usr/lib/jvm/java-17-openjdk-$archabi ] ; then + export JAVA_HOME=/usr/lib/jvm/java-17-openjdk-$archabi +elif [ -e /usr/lib/jvm/java-11-openjdk-$archabi ] ; then + export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-$archabi +fi if [ ! -e $JAVA_HOME ] ; then echo $JAVA_HOME does not exist exit 1 @@ -25,7 +29,7 @@ test_basename=`echo ${test_class} | sed 's/.*\.//g'` logfile=$rootdir/${bname}-${test_basename}-${archabi}.log rm -f $logfile -java=/usr/lib/jvm/java-17-openjdk-${archabi}/bin/java +java=${JAVA_HOME}/bin/java project_dir=/usr/local/projects/zafena/direct_bt build_dir=${project_dir}/build-${archabi} |