29 lines
565 B
Bash
Executable File
29 lines
565 B
Bash
Executable File
#!/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`
|
|
if [[ "$javaVersionCheck" =~ ^.*\ 11. ]]; then
|
|
echo "Java 11 version requirement..... OK"
|
|
let "okCount+=1"
|
|
else
|
|
echo "Java 11 version requirement..... MISSING"
|
|
fi
|
|
|
|
if [ "$okCount" == 2 ]; then
|
|
java -jar hebdobot.jar $@
|
|
else
|
|
echo "Sorry, Hebdobot launch requires Java 8, abort."
|
|
fi
|