Skip to content

Commit

Permalink
install.sh: check both openjdk-8 and openjdk-11
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
amoskong committed Aug 26, 2020
1 parent 8d0a424 commit e09caba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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.8 ]]; 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
Expand Down

0 comments on commit e09caba

Please sign in to comment.