Skip to content

Commit

Permalink
Merge pull request overleaf#558 from sharelatex/sk-allow-no-nvm
Browse files Browse the repository at this point in the history
check for nvm presence before using, survive abscence
  • Loading branch information
Shane Kilkelly authored Sep 6, 2017
2 parents 0e6abc6 + 59f8570 commit f7cce11
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions bin/install-services
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit f7cce11

Please sign in to comment.