overleaf/server-ce/bin/install-services
2017-09-06 13:37:34 +01:00

25 lines
542 B
Bash

#! 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'
type -t nvm && nvm install
type -t nvm && nvm use
echo ' installing Dependencies'
npm install
grunt install
popd
done