makedeb


nodejs20-renamed-bin 20.18.1-0


Renamed nodejs 20 that doesn't conflict with other versions and unrenamed in libexec/node20 for adding to PATH

Viewing /update.

View raw.

Click here to go back to the Git tree for nodejs20-renamed-bin.

#!/bin/sh

readonly MAJOR_VERSION="20"

hashversionarch="$(wget  -o /dev/null -O- https://nodejs.org/download/release/latest-v${MAJOR_VERSION}.x/SHASUMS256.txt | grep linux.*tar.xz$)"
echo "$hashversionarch"

version="$(echo "$hashversionarch" | head -n 1 | cut -d '-' -f 2 | sed 's/v//')"
echo "$version"

hashamd64="$(echo "$hashversionarch" | grep x64.tar.xz$ | cut -d ' ' -f 1)"
hasharm64="$(echo "$hashversionarch" | grep arm64.tar.xz$ | cut -d ' ' -f 1)"
hasharmhf="$(echo "$hashversionarch" | grep armv7l.tar.xz$ | cut -d ' ' -f 1)"
hashppc64el="$(echo "$hashversionarch" | grep ppc64le.tar.xz$ | cut -d ' ' -f 1)"
hashs390x="$(echo "$hashversionarch" | grep s390x.tar.xz$ | cut -d ' ' -f 1)"

echo "$hashamd64"

sed -i "s!pkgver=.*!pkgver=\"$version\"!;s!sha256sums_amd64=.*!sha256sums_amd64=\(\'$hashamd64\'\)!;s!sha256sums_arm64=.*!sha256sums_arm64=\(\'$hasharm64\'\)!;s!sha256sums_armhf=.*!sha256sums_armhf=\(\'$hasharmhf\'\)!;s!sha256sums_ppc64el=.*!sha256sums_ppc64el=\(\'$hashppc64el\'\)!;s!sha256sums_s390x=.*!sha256sums_s390x=\(\'$hashs390x\'\)!" PKGBUILD