diff --git a/bin/installDeps.sh b/bin/installDeps.sh index ece5b7aae..cb3676063 100755 --- a/bin/installDeps.sh +++ b/bin/installDeps.sh @@ -20,12 +20,26 @@ hash node > /dev/null 2>&1 || { exit 1 } +#check node version +NODE_VERSION=$(node --version) +if [ ! $(echo $NODE_VERSION | cut -d "." -f 1-2) = "v0.4" ]; then + echo "You're running a wrong version of node, you're using $NODE_VERSION, we need v0.4.x" >&2 + exit 1 +fi + #Is npm installed? hash npm > /dev/null 2>&1 || { echo "Please install npm ( http://npmjs.org )" >&2 exit 1 } +#check npm version +NPM_VERSION=$(npm --version) +if [ ! $(echo $NPM_VERSION | cut -d "." -f 1-2) = "1.0" ]; then + echo "You're running a wrong version of npm, you're using $NPM_VERSION, we need 1.0.x" >&2 + exit 1 +fi + #Does a settings.json exist? if no copy the template if [ ! -f "settings.json" ]; then echo "Copy the settings template to settings.json..."