install.sh: check both openjdk-8 and openjdk-11
On Debian10, only Openjdk-11 is available, the install.sh fails in java checking. Openjdk-8 and Openjdk-11 all work well, we should check both of them. This patch also fixed the error message. Signed-off-by: Amos Kong <amos@scylladb.com>
This commit is contained in:
parent
6311525346
commit
d998ac2e1e
@ -78,12 +78,12 @@ if ! $packaging; then
|
||||
has_java=false
|
||||
if [ -x /usr/bin/java ]; then
|
||||
javaver=$(/usr/bin/java -version 2>&1|head -n1|cut -f 3 -d " ")
|
||||
if [[ "$javaver" =~ ^\"1.8.0 ]]; then
|
||||
if [[ "$javaver" =~ ^\"1.8.0 || "$javaver" =~ ^\"11.0. ]]; then
|
||||
has_java=true
|
||||
fi
|
||||
fi
|
||||
if ! $has_java; then
|
||||
echo "Please install openjdk-8 before running install.sh."
|
||||
echo "Please install openjdk-8 or openjdk-11 before running install.sh."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user