-
-
Save nverba/017f50a655586f10b875 to your computer and use it in GitHub Desktop.
No sudo install of n & iojs with NPM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# prerequisites, the terminal should be able to "Run command as login shell", see profile/title & commands | |
# Create .local/bin | |
mkdir -p ~/.local/bin | |
# Add local/bin to path & add environment variable N_PREFIX | |
printf '\nexport PATH=$PATH:$HOME/.local/bin' >> $HOME/.bash_profile | |
printf '\nexport N_PREFIX=$HOME/.local' >> $HOME/.bash_profile | |
# Download n | |
git clone https://github.com/visionmedia/n | |
# Install n to ~/.local | |
PREFIX=$HOME/.local make install -C n | |
# Reload .bash_profile | |
source ~/.bash_profile | |
# Delete n download | |
rm -rf n | |
# You should now be ready to install node stable after realoading all terminals. | |
# $ n stable or "$ n io stable", for io flavoured node |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
how we get sudoo and node