lol
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

at 23.11-beta 40 lines 1.4 kB view raw
1#! /usr/bin/env nix-shell 2#! nix-shell update-shell.nix -i bash 3 4# Update script for the vscode versions and hashes. 5# Usually doesn't need to be called by hand, 6# but is called by a bot: https://github.com/samuela/nixpkgs-upkeep/actions 7# Call it by hand if the bot fails to automatically update the versions. 8 9set -eou pipefail 10 11ROOT="$(dirname "$(readlink -f "$0")")" 12if [ ! -f "$ROOT/vscodium.nix" ]; then 13 echo "ERROR: cannot find vscodium.nix in $ROOT" 14 exit 1 15fi 16 17update_vscodium () { 18 VSCODIUM_VER=$1 19 ARCH=$2 20 ARCH_LONG=$3 21 ARCHIVE_FMT=$4 22 VSCODIUM_URL="https://github.com/VSCodium/vscodium/releases/download/${VSCODIUM_VER}/VSCodium-${ARCH}-${VSCODIUM_VER}.${ARCHIVE_FMT}" 23 VSCODIUM_SHA256=$(nix-prefetch-url ${VSCODIUM_URL}) 24 sed -i "s/${ARCH_LONG} = \".\{52\}\"/${ARCH_LONG} = \"${VSCODIUM_SHA256}\"/" "$ROOT/vscodium.nix" 25} 26 27# VSCodium 28 29VSCODIUM_VER=$(curl -Ls -w %{url_effective} -o /dev/null https://github.com/VSCodium/vscodium/releases/latest | awk -F'/' '{print $NF}') 30sed -i "s/version = \".*\"/version = \"${VSCODIUM_VER}\"/" "$ROOT/vscodium.nix" 31 32update_vscodium $VSCODIUM_VER linux-x64 x86_64-linux tar.gz 33 34update_vscodium $VSCODIUM_VER darwin-x64 x86_64-darwin zip 35 36update_vscodium $VSCODIUM_VER linux-arm64 aarch64-linux tar.gz 37 38update_vscodium $VSCODIUM_VER darwin-arm64 aarch64-darwin zip 39 40update_vscodium $VSCODIUM_VER linux-armhf armv7l-linux tar.gz