install-services 526 B

123456789101112131415161718192021222324
  1. #! env bash
  2. [ -z "`type -t nvm`" ] && cat <<EOF
  3. ==========================================================
  4. == NVM not installed, you should consider installing it ==
  5. ==========================================================
  6. EOF
  7. grep 'name:' config/services.js | \
  8. sed 's/.*name: "\(.*\)",/\1/' | \
  9. while read service
  10. do
  11. pushd $service
  12. echo "Installing Service $service"
  13. echo ' installing Node'
  14. type -t nvm && nvm install
  15. type -t nvm && nvm use
  16. echo ' installing Dependencies'
  17. npm install
  18. popd
  19. done