Skip to content

Commit

Permalink
Update nodejs-update
Browse files Browse the repository at this point in the history
  • Loading branch information
sspans committed Jul 24, 2020
1 parent 9c04ab4 commit 1d3033d
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion stage3_homebridge/01-homebridge/files/nodejs-update
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,16 @@ if [ $LTS != $CURRENT ]; then
echo "Updating Node.js to $LTS..."

PREFIX=$(npm -g prefix || echo "/usr/local")
curl -Lsf "https://unofficial-builds.nodejs.org/download/release/$LTS/node-$LTS-linux-armv6l.tar.gz" | sudo tar xzf - -C /usr/local --strip-components=1 --no-same-owner
case "$(dpkg-architecture -q DEB_TARGET_ARCH)" in
arm64)
curl -Lsf "https://nodejs.org/dist/$LTS/node-$LTS-linux-arm64.tar.xz" | \
sudo tar xf - -C ${PREFIX} --strip-components=1 --no-same-owner
;;
armhf)
curl -Lsf "https://unofficial-builds.nodejs.org/download/release/$LTS/node-$LTS-linux-armv6l.tar.gz" | \
sudo tar xf - -C ${PREFIX} --strip-components=1 --no-same-owner
;;
esac

echo "Node.js $(node -v)"
echo "npm $(npm -v)"
Expand Down

0 comments on commit 1d3033d

Please sign in to comment.