Last active
April 3, 2020 01:36
-
-
Save saxenap/edf4bb741cc1e20ea0ea1de8cbb639d3 to your computer and use it in GitHub Desktop.
This file contains 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 | |
# rm -rf node_installation && wget -O node_installation https://gist.githubusercontent.com/saxenap/edf4bb741cc1e20ea0ea1de8cbb639d3/raw/ && chmod 777 node_installation && ./node_installation | |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash | |
. ~/.nvm/nvm.sh | |
nvm install node | |
# https://stackoverflow.com/a/29903645 | |
n=$(which node); \ | |
n=${n%/bin/node}; \ | |
chmod -R 755 $n/bin/*; \ | |
sudo cp -r $n/{bin,lib,share} /usr/local | |
node -e "console.log('Running Node.js ' + process.version)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment