1#!/usr/bin/env nix-shell
2#!nix-shell -i bash -p common-updater-scripts curl
3# shellcheck shell=bash
4
5set -eu -o pipefail
6
7# The first valid version in the changelog should always be the latest version.
8version="$(curl https://www.der-hammer.info/terminal/CHANGELOG.txt | grep -m1 -Po '[0-9]+\.[0-9]+\.[0-9]+')"
9
10function update_hash_for_system() {
11 local system="$1"
12 # Reset the version number so the second architecture update doesn't get ignored.
13 update-source-version hterm 0 "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" --system="$system"
14 update-source-version hterm "$version" --system="$system"
15}
16
17update_hash_for_system x86_64-linux
18update_hash_for_system i686-linux