summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn McLear <john@mclear.co.uk>2016-03-26 22:09:53 +0800
committerJohn McLear <john@mclear.co.uk>2016-03-26 22:09:53 +0800
commitb698927474851efd25c4aa3d583c5af9293a37fe (patch)
treef871aea13e45a990dc5a1aaaede2a40ddd7b0849
parent9b1598d50c225c0d0c6b581634cd06524b4fd311 (diff)
parent2a81d2a57803b5ac1ff9f7c108dc619aa050f352 (diff)
downloadetherpad-lite-b698927474851efd25c4aa3d583c5af9293a37fe.zip
Merge pull request #2931 from Gared/improve_node_version_check
Improve node version check
-rwxr-xr-xbin/installDeps.sh13
1 files changed, 4 insertions, 9 deletions
diff --git a/bin/installDeps.sh b/bin/installDeps.sh
index df6ea9fb..2e1d465d 100755
--- a/bin/installDeps.sh
+++ b/bin/installDeps.sh
@@ -47,15 +47,10 @@ fi
NODE_VERSION=$(node --version)
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
-if hash iojs 2>/dev/null; then
- IOJS_VERSION=$(iojs --version)
-fi
-if [ ! $NODE_V_MINOR = "v0.10" ] && [ ! $NODE_V_MINOR = "v0.11" ] && [ ! $NODE_V_MINOR = "v0.12" ] && [ ! $NODE_V_MAIN = "v4" ] && [ ! $NODE_V_MAIN = "v5" ]; 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 node v0.10.x or higher" >&2
- exit 1
- fi
+NODE_V_MAIN=${NODE_V_MAIN#"v"}
+if [ ! $NODE_V_MINOR = "v0.10" ] && [ ! $NODE_V_MINOR = "v0.11" ] && [ ! $NODE_V_MINOR = "v0.12" ] && [ ! $NODE_V_MAIN -gt 4 ]; then
+ echo "You're running a wrong version of node. You're using $NODE_VERSION, we need node v0.10.x or higher" >&2
+ exit 1
fi
#Get the name of the settings file