2018-01-06 02:18:34 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
okCount=0
|
|
|
|
|
|
|
|
# Java check.
|
|
|
|
javaCheck=`which java`
|
|
|
|
if [[ "$javaCheck" =~ ^/.* ]]; then
|
|
|
|
echo "Java requirement............... OK"
|
|
|
|
let "okCount+=1"
|
|
|
|
else
|
|
|
|
echo "Java requirement............... MISSING"
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
# Java version check.
|
|
|
|
javaVersionCheck=`java -version 2>&1`
|
2021-04-09 01:19:21 +02:00
|
|
|
if [[ "$javaVersionCheck" =~ ^.*\ 11. ]]; then
|
|
|
|
echo "Java 11 version requirement..... OK"
|
2018-01-06 02:18:34 +01:00
|
|
|
let "okCount+=1"
|
|
|
|
else
|
2021-04-09 01:19:21 +02:00
|
|
|
echo "Java 11 version requirement..... MISSING"
|
2018-01-06 02:18:34 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$okCount" == 2 ]; then
|
|
|
|
java -jar hebdobot.jar $@
|
|
|
|
else
|
|
|
|
echo "Sorry, Hebdobot launch requires Java 8, abort."
|
|
|
|
fi
|