2024-05-14 23:13:03 +01:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
|
|
set -x
|
|
|
|
|
declare -A archMap=(["amd64"]="x64" ["arm64"]="arm64")
|
|
|
|
|
ARCH="${archMap["$TARGETARCH"]}"
|
2025-10-01 11:06:34 +01:00
|
|
|
# The .node-version file generally doesn't have the 'v' (renovate does not put the 'v' and will
|
2025-10-01 10:49:00 +01:00
|
|
|
# strip it on upgrade if it's there) but the 'v' is also widely supported so we probably ought
|
|
|
|
|
# to just work either way.
|
|
|
|
|
NODE_VERSION=$(cat /.node-version | sed -e 's/^v//')
|
|
|
|
|
curl --proto "=https" -L "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-$TARGETOS-$ARCH.tar.gz" | tar xz -C /usr/local --strip-components=1 && \
|
2024-05-14 23:13:03 +01:00
|
|
|
unlink /usr/local/CHANGELOG.md && unlink /usr/local/LICENSE && unlink /usr/local/README.md
|