|
@ -4,25 +4,56 @@ |
|
|
# and a useful error message for missing prerequisites. |
|
|
# and a useful error message for missing prerequisites. |
|
|
# |
|
|
# |
|
|
|
|
|
|
|
|
|
|
|
ERRORS=0 |
|
|
|
|
|
|
|
|
|
|
|
uname -a | grep -ni linux >/dev/null |
|
|
|
|
|
RET=$? |
|
|
|
|
|
if [ "x$RET" != "x0" ]; then |
|
|
|
|
|
echo "*** Based on uname, you're not running on Linux. Duktape developer" |
|
|
|
|
|
echo " makefile is intended for Linux only; YMMV on other platforms." |
|
|
|
|
|
echo "" |
|
|
|
|
|
sleep 1 |
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
NODE_VERSION=`node -v 2>/dev/null` |
|
|
NODE_VERSION=`node -v 2>/dev/null` |
|
|
if [ "x$NODE_VERSION" = "x" ]; then |
|
|
if [ $? != 0 ]; then |
|
|
echo "*** Missing NodeJS:" |
|
|
echo "*** Missing NodeJS:" |
|
|
echo " $ sudo apt-get install nodejs npm" |
|
|
echo " $ sudo apt-get install nodejs npm" |
|
|
exit 1 |
|
|
echo "" |
|
|
|
|
|
ERRORS=1 |
|
|
fi |
|
|
fi |
|
|
|
|
|
#echo "Node version: $NODE_VERSION" |
|
|
|
|
|
|
|
|
GIT_VERSION=`git --version` |
|
|
GIT_VERSION=`git --version 2>/dev/null` |
|
|
if [ "x$GIT_VERSION" = "x" ]; then |
|
|
if [ $? != 0 ]; then |
|
|
echo "*** Missing git:" |
|
|
echo "*** Missing git:" |
|
|
echo " $ sudo apt-get install git" |
|
|
echo " $ sudo apt-get install git" |
|
|
exit 1 |
|
|
echo "" |
|
|
|
|
|
ERRORS=1 |
|
|
fi |
|
|
fi |
|
|
|
|
|
#echo "Git version: $GIT_VERSION" |
|
|
|
|
|
|
|
|
uname -a | grep -ni linux >/dev/null |
|
|
PERL_VERSION=`perl -version 2>/dev/null` |
|
|
RET=$? |
|
|
if [ $? != 0 ]; then |
|
|
if [ "x$RET" != "x0" ]; then |
|
|
echo "*** Missing perl:" |
|
|
echo "*** Based on uname, you're not running on Linux. Duktape developer" |
|
|
echo " $ sudo apt-get install perl" |
|
|
echo " makefile is intended for Linux only; YMMV on other platforms." |
|
|
|
|
|
echo "" |
|
|
echo "" |
|
|
sleep 1 |
|
|
ERRORS=1 |
|
|
fi |
|
|
fi |
|
|
|
|
|
#echo "PERL_VERSION: $PERL_VERSION" |
|
|
|
|
|
|
|
|
|
|
|
JAVA_VERSION=`java -version 2>&1` |
|
|
|
|
|
if [ $? != 0 ]; then |
|
|
|
|
|
echo "*** Missing java:" |
|
|
|
|
|
echo " $ sudo apt-get install openjdk-7-jre" |
|
|
|
|
|
echo "" |
|
|
|
|
|
ERRORS=1 |
|
|
|
|
|
fi |
|
|
|
|
|
#echo "JAVA_VERSION: $JAVA_VERSION" |
|
|
|
|
|
|
|
|
|
|
|
if [ "x$ERRORS" = "x0" ]; then |
|
|
|
|
|
exit 0 |
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
echo "*** Errors found in system setup, see error messages above!" |
|
|
|
|
|
exit 1 |
|
|