makedeb


nodejs22-renamed-bin 22.11.0-0


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

Viewing /update.

View raw.

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

#!/bin/sh

  case "$(arch)" in
  x86_64)
       _archname="x64"
        ;;
  aarch64)
       _archname="arm64"
        ;;
  armv7h)
       _archname="armv7l"
        ;;
  ppc64le)
      _archname="ppc64le"
        ;;
  s390x)
       _archname="s390x"
        ;;
  *)
     echo "arch name not recognized"

     exit 1
        ;;
  esac

echo "$_archname"

hashversion="$(wget  -o /dev/null -O- https://nodejs.org/download/release/latest-v22.x/SHASUMS256.txt | grep linux-$_archname.tar.xz | sed "s!node-v!!;s!-linux-$_archname.tar.xz!!")"

version="$(echo $hashversion | cut -d ' ' -f 2)"
echo "$version"

hash="$(echo $hashversion | cut -d ' ' -f 1)"
echo "$hash"

sed -i "s!pkgver=.*!pkgver=\"$version\"!;s!sha256sums=.*!sha256sums=\(\'$hash\'\)!" PKGBUILD