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