Unverified Commit b2c3907f authored by Luflosi's avatar Luflosi
Browse files

vscodium: fix update script to work with longer hashes

The previous VSCodium update introduced longer hashes. This broke the update script, since the hash length is hardcoded. To fix this, make the hash length a bit more flexible and in exchange, make sure the characters are hexadecimal.
parent a6d28112
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@ update_vscodium () {
  ARCHIVE_FMT=$4
  VSCODIUM_URL="https://github.com/VSCodium/vscodium/releases/download/${VSCODIUM_VER}/VSCodium-${ARCH}-${VSCODIUM_VER}.${ARCHIVE_FMT}"
  VSCODIUM_SHA256=$(nix-prefetch-url ${VSCODIUM_URL})
  sed -i "s/${ARCH_LONG} = \".\{52\}\"/${ARCH_LONG} = \"${VSCODIUM_SHA256}\"/" "$ROOT/vscodium.nix"
  sed -i "s/${ARCH_LONG} = \"[0-9a-fA-F]\{40,64\}\"/${ARCH_LONG} = \"${VSCODIUM_SHA256}\"/" "$ROOT/vscodium.nix"
}

# VSCodium