Merge pull request #2787 from Gared/support_node_4

Support version 4 of node.js
This commit is contained in:
Stefan 2015-10-10 13:17:03 +02:00
commit 3b45b4833b
1 changed files with 3 additions and 2 deletions

View File

@ -46,13 +46,14 @@ fi
#check node version #check node version
NODE_VERSION=$(node --version) NODE_VERSION=$(node --version)
NODE_V_MINOR=$(echo $NODE_VERSION | cut -d "." -f 1-2) NODE_V_MINOR=$(echo $NODE_VERSION | cut -d "." -f 1-2)
NODE_V_MAIN=$(echo $NODE_VERSION | cut -d "." -f 1)
#iojs version checking added #iojs version checking added
if hash iojs 2>/dev/null; then if hash iojs 2>/dev/null; then
IOJS_VERSION=$(iojs --version) IOJS_VERSION=$(iojs --version)
fi fi
if [ ! $NODE_V_MINOR = "v0.10" ] && [ ! $NODE_V_MINOR = "v0.11" ] && [ ! $NODE_V_MINOR = "v0.12" ]; then if [ ! $NODE_V_MINOR = "v0.10" ] && [ ! $NODE_V_MINOR = "v0.11" ] && [ ! $NODE_V_MINOR = "v0.12" ] && [ ! $NODE_V_MAIN = "v4" ]; then
if [ ! $IOJS_VERSION ]; then if [ ! $IOJS_VERSION ]; then
echo "You're running a wrong version of node, or io.js is not installed. You're using $NODE_VERSION, we need v0.10.x, v0.11.x or v0.12.x" >&2 echo "You're running a wrong version of node, or io.js is not installed. You're using $NODE_VERSION, we need node v0.10.x or higher" >&2
exit 1 exit 1
fi fi
fi fi