Skip to content

Instantly share code, notes, and snippets.

@meandavejustice
Created February 25, 2014 22:14
Show Gist options
  • Save meandavejustice/9219042 to your computer and use it in GitHub Desktop.
Save meandavejustice/9219042 to your computer and use it in GitHub Desktop.
Reads in a txt file of node-modules you want to globally install and installs them... globally.
#!/usr/bin/env bash
# Trap interrupts and exit instead of continuing the loop
trap "echo Exited!; exit;" SIGINT SIGTERM
while read line; do
npm install -g $line
done < ./global-modules.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment