node 355 B

1234567891011121314
  1. #!/bin/bash
  2. set -o errexit -o pipefail
  3. if ! has node; then
  4. gimme gcc git
  5. if [[ "$OS" = "Darwin" ]]; then
  6. gimme_pkg node
  7. else
  8. gimme_pkg nodejs npm libgnome-keyring-dev fakeroot
  9. sudo npm config set python /usr/bin/python2 -g
  10. if has update-alternatives; then
  11. sudo update-alternatives --install /usr/bin/node node /usr/bin/nodejs 10
  12. fi
  13. fi
  14. fi