Created
October 23, 2021 15:39
-
-
Save devmatteini/88319045d1cf981d464190df3c06e3f3 to your computer and use it in GitHub Desktop.
Install node on Raspberry Pi Zero
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 | |
if [ -z "$1" ];then | |
echo "Usage: $(basename "${BASH_SOURCE[0]}") <version>" | |
exit 1 | |
fi | |
version=$1 | |
archive="node-${version}-download" | |
folder="node-${version}" | |
echo "Download node tar archive..." | |
curl -s "https://unofficial-builds.nodejs.org/download/release/v${version}/node-v${version}-linux-armv6l.tar.gz" -o "$archive" | |
echo "Extracting node archive..." | |
tar xf "$archive" | |
mv "node-v${version}-linux-armv6l" "$folder" | |
eval "./${folder}/bin/node --version" | |
rm "$archive" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment