Merge pull request #558 from sharelatex/sk-allow-no-nvm

check for nvm presence before using, survive abscence
This commit is contained in:
Shane Kilkelly 2017-09-06 10:51:27 +01:00 committed by GitHub
commit 4170302d3f

View file

@ -1,15 +1,24 @@
#! env bash #! env bash
[ -z "`type -t nvm`" ] && cat <<EOF
==========================================================
== NVM not installed, you should consider installing it ==
==========================================================
EOF
grep 'name:' config/services.js | \ grep 'name:' config/services.js | \
sed 's/.*name: "\(.*\)",/\1/' | \ sed 's/.*name: "\(.*\)",/\1/' | \
while read service while read service
do do
pushd $service && pushd $service
echo "Installing Service $service" && echo "Installing Service $service"
echo ' installing Node' && echo ' installing Node'
nvm install && type -t nvm && nvm install
nvm use && type -t nvm && nvm use
echo ' installing Dependencies' && echo ' installing Dependencies'
npm install npm install
popd popd
done done