_node_pkg 183 B

12345678
  1. #!/bin/bash
  2. set -o errexit -o pipefail
  3. PKG=$(basename "$0")
  4. if [[ "$OS" = "Darwin" ]]; then
  5. has "$PKG" || npm install -g "$PKG"
  6. else
  7. has "$PKG" || sudo npm install -g "$PKG"
  8. fi