aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/rebuild.sh
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2022-04-24 05:27:04 +0200
committerSven Gothel <[email protected]>2022-04-24 05:27:04 +0200
commit7c9b5244304340f43534adb2d5288ed41c3a00e4 (patch)
tree7e4ec7fc8625c18cc2c061ee0586ee67dca8c6b2 /scripts/rebuild.sh
parent11405d3dd3df0dab041972ff5c25d2fb6e97aeb1 (diff)
build scripts: Only use OpenJDK 17 if available (Not available on Debian 10)
Diffstat (limited to 'scripts/rebuild.sh')
-rw-r--r--scripts/rebuild.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/rebuild.sh b/scripts/rebuild.sh
index dae49bec..997a5f42 100644
--- a/scripts/rebuild.sh
+++ b/scripts/rebuild.sh
@@ -9,7 +9,11 @@ bname=`basename $0 .sh`
logfile=$rootdir/$bname-$archabi.log
rm -f $logfile
-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