Skip to content

Instantly share code, notes, and snippets.

@DTrejo
Created April 24, 2011 06:44
Show Gist options
  • Save DTrejo/939377 to your computer and use it in GitHub Desktop.
Save DTrejo/939377 to your computer and use it in GitHub Desktop.
npm_install_arbitrary_node_location.sh
# install npm on machines with node at arbitrary spot
# node is installed at some arbitrary path
echo '# npm paths' >> ~/.bashrc
echo 'export PATH=~/bin:~/local/share/man:$PATH' >> ~/.bashrc
echo 'export MANPATH=$MANPATH:~/local/share/man' # I think this may not work
. ~/.bashrc
cat <<NPMRC >>$HOME/.npmrc
root = ~/.node_libraries
manroot = ~/local/share/man
binroot = ~/bin
NPMRC
curl http://npmjs.org/install.sh | sh
# based on https://gist.github.com/579814#file_yet_another_option.sh
@DTrejo
Copy link
Author

DTrejo commented Apr 24, 2011

using this to install npm onto brown cs machines that already have node installed in /contrib/bin/node via /contrib/projects/node

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment