install-services 542 B

12345678910111213141516171819202122232425
  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. grunt install
  19. popd
  20. done