Created
May 25, 2018 21:06
-
-
Save jimbuck/70248464d37eb3f7ea5afb3fae7406e1 to your computer and use it in GitHub Desktop.
PI Zero NodeJS
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 | |
version=$1 | |
if [ -z "$version" ]; then | |
echo Must provide a version! | |
exit; | |
fi | |
filename=node-v$version-linux-armv6l | |
echo Installing NodeJS v$1... | |
echo " Downloading..." | |
curl -o ./downloads/$filename.tar.gz https://nodejs.org/dist/latest/$filename.tar.gz | |
echo " Extracting..." | |
tar -xzf ./downloads/$filename.tar.gz -C ./temp | |
echo " Installing..." | |
cp -r ./temp/$filename/* /usr/local/ | |
node -v | |
npm -v | |
echo " Complete!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment