Created
October 27, 2021 20:33
-
-
Save nopivnick/c26a72c7e02253906d86a0457bd57d15 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
export NODE_VER=12.22.7 | |
if ! node --version | grep -q ${NODE_VER}; then | |
(cat /proc/cpuinfo | grep -q "Pi Zero") && if [ ! -d node-v${NODE_VER}-linux-armv6l ]; then | |
echo "Installing nodejs ${NODE_VER} for armv6 from unofficial builds..." | |
curl -O https://unofficial-builds.nodejs.org/download/release/v${NODE_VER}/node-v${NODE_VER}-linux-armv6l.tar.xz | |
tar -xf node-v${NODE_VER}-linux-armv6l.tar.xz | |
fi | |
echo "Adding node to the PATH" | |
PATH=$(pwd)/node-v${NODE_VER}-linux-armv6l/bin:${PATH} | |
fi | |
node --version # or whatever .... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment