mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-25 04:33:55 +00:00
Merge pull request #558 from sharelatex/sk-allow-no-nvm
check for nvm presence before using, survive abscence
This commit is contained in:
commit
4170302d3f
1 changed files with 15 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue