41 lines
783 B
Bash
41 lines
783 B
Bash
|
#/bin/bash
|
||
|
|
||
|
echo "Hebdobot build"
|
||
|
|
||
|
okCount=0
|
||
|
|
||
|
# Ant check.
|
||
|
antCheck=`which ant`
|
||
|
if [[ "$antCheck" =~ ^/.* ]]; then
|
||
|
echo "Ant requirement................ OK"
|
||
|
let "okCount+=1"
|
||
|
else
|
||
|
echo "Ant requirement................ MISSING"
|
||
|
fi
|
||
|
|
||
|
# Javac check.
|
||
|
javacCheck=`which javac`
|
||
|
if [[ "$javacCheck" =~ ^/.* ]]; then
|
||
|
echo "Javac requirement.............. OK"
|
||
|
let "okCount+=1"
|
||
|
else
|
||
|
echo "Javac requirement.............. MISSING"
|
||
|
fi
|
||
|
|
||
|
# Java version check.
|
||
|
javaVersionCheck=`javac -version 2>&1`
|
||
|
if [[ "$javaVersionCheck" =~ ^.*\ 1.8 ]]; then
|
||
|
echo "Java 8 version requirement..... OK"
|
||
|
let "okCount+=1"
|
||
|
else
|
||
|
echo "Java 8 version requirement..... MISSING"
|
||
|
fi
|
||
|
|
||
|
if [ "$okCount" == 3 ]; then
|
||
|
echo "Requirement OK"
|
||
|
ant -f build.xml
|
||
|
else
|
||
|
echo "Requirement MISSING, build abort"
|
||
|
fi
|
||
|
|