aboutsummaryrefslogtreecommitdiffstats
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
parent11405d3dd3df0dab041972ff5c25d2fb6e97aeb1 (diff)
build scripts: Only use OpenJDK 17 if available (Not available on Debian 10)
-rwxr-xr-xscripts/build-doc.sh6
-rw-r--r--scripts/build.sh6
-rw-r--r--scripts/rebuild-doc.sh6
-rw-r--r--scripts/rebuild.sh6
-rwxr-xr-xscripts/run-java-trial.sh8
5 files changed, 26 insertions, 6 deletions
diff --git a/scripts/build-doc.sh b/scripts/build-doc.sh
index 2702b86c..c67ec4c6 100755
--- a/scripts/build-doc.sh
+++ b/scripts/build-doc.sh
@@ -8,7 +8,11 @@ rm -f $logfile
. $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
diff --git a/scripts/build.sh b/scripts/build.sh
index a3b9310a..b5a99a53 100644
--- a/scripts/build.sh
+++ b/scripts/build.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
diff --git a/scripts/rebuild-doc.sh b/scripts/rebuild-doc.sh
index a4617b7e..82936dd4 100644
--- a/scripts/rebuild-doc.sh
+++ b/scripts/rebuild-doc.sh
@@ -8,7 +8,11 @@ rm -f $logfile
. $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
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
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}