Last active
December 2, 2015 13:31
-
-
Save AGresvig/af21abddc4f6c8f4c2df to your computer and use it in GitHub Desktop.
Script to set up NodeJS on RPi
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 | |
# Script to set up NodeJS on RPi | |
# Make sure only root can run our script | |
if [[ $EUID -ne 0 ]]; then | |
echo "This script must be run as root" 1>&2 | |
exit 1 | |
fi | |
# Time this script | |
T="$(date +%s)" | |
echo | |
echo "*** Downloading and installing latest Node" | |
echo | |
echo | |
wget http://node-arm.herokuapp.com/node_latest_armhf.deb | |
dpkg -i node_latest_armhf.deb | |
echo | |
echo "**** NodeJS installed:" | |
node -v | |
echo | |
T="$(($(date +%s)-T))" | |
echo "Time spent: $T"% | |
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 | |
# Script to set up NodeJS on RPi | |
# Make sure only root can run our script | |
if [[ $EUID -ne 0 ]]; then | |
echo "This script must be run as root" 1>&2 | |
exit 1 | |
fi | |
# Time this script | |
T="$(date +%s)" | |
echo | |
echo "*** Downloading and installing latest Node" | |
echo | |
echo | |
wget https://nodejs.org/dist/v4.0.0/node-v4.0.0-linux-armv6l.tar.gz | |
tar -xvf node-v4.0.0-linux-armv6l.tar.gz | |
cd node-v4.0.0-linux-armv6l | |
cp -R * /usr/local/ | |
cd .. | |
rm node-v4.0.0-linux-armv6l.tar.gz | |
rm -rf node-v4.0.0-linux-armv6l | |
echo | |
echo "**** NodeJS installed:" | |
node -v | |
echo | |
T="$(($(date +%s)-T))" | |
echo "Time spent: $T"% | |
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 | |
# Script to set up NodeJS on RPi | |
# Make sure only root can run our script | |
if [[ $EUID -ne 0 ]]; then | |
echo "This script must be run as root" 1>&2 | |
exit 1 | |
fi | |
# Time this script | |
T="$(date +%s)" | |
echo | |
echo "*** Downloading and installing latest Node" | |
echo | |
echo | |
wget https://nodejs.org/dist/v4.0.0/node-v4.0.0-linux-armv7l.tar.gz | |
tar -xvf node-v4.0.0-linux-armv7l.tar.gz | |
cd node-v4.0.0-linux-armv7l | |
cp -R * /usr/local/ | |
cd .. | |
rm node-v4.0.0-linux-armv7l.tar.gz | |
rm -rf node-v4.0.0-linux-armv7l | |
echo | |
echo "**** NodeJS installed:" | |
node -v | |
echo | |
T="$(($(date +%s)-T))" | |
echo "Time spent: $T"% | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment