From 9d664acf4768aa7724a1dd2f1cbd6a3267396c7d Mon Sep 17 00:00:00 2001 From: TBK Date: Sat, 25 Jul 2026 16:27:15 +0200 Subject: [PATCH] Update to 9.41.1 --- .SRCINFO | 6 +++--- PKGBUILD | 6 +++--- upd.sh | 33 +++++++++++++++++++++++++++------ 3 files changed, 33 insertions(+), 12 deletions(-) diff --git a/.SRCINFO b/.SRCINFO index 74d27a1..b34466c 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,6 +1,6 @@ pkgbase = termius pkgdesc = Desktop SSH Client - pkgver = 9.40.1 + pkgver = 9.41.1 pkgrel = 1 url = https://www.termius.com/ arch = x86_64 @@ -24,10 +24,10 @@ pkgbase = termius optdepends = libappindicator-gtk3 options = !strip options = !debug - source = termius-9.40.1.snap::https://api.snapcraft.io/api/v1/snaps/download/WkTBXwoX81rBe3s3OTt3EiiLKBx2QhuS_264.snap + source = termius-9.41.1.snap::https://api.snapcraft.io/api/v1/snaps/download/WkTBXwoX81rBe3s3OTt3EiiLKBx2QhuS_265.snap source = termius.desktop source = tos.html - sha512sums = 090f995c33fc449ad97e9f9fd46744cbaae878ba248fa3b098370755118d6c3e5d72ed78cf38cae499985f1b2bf81d8d47d91f3e4c50c5c706d0bd024b3f4e8a + sha512sums = 7ea3f2b6512d8488536dd08ec8ca04ecab0972987c6ae52b47c5aaeaf8647d0beb6a18937767a31a2e8cc6df7ca19e190db430539c6fdc1946d3be4c7b4b766c sha512sums = f1ce576d42a624842c9d08807c11580421b708b4bd7fac3aa9874769735df87566012e8fc0f993b08618f31d2f38588cd83d8572a2700f35d42e2761984ca5d0 sha512sums = 6ac7c082d1adba92dd911f46f9926f702be0f92a9843e6252364477d81364569eeeee9b37170a6d9000fde644588734cb6a11d165fc0aff3dbfbcd6ad353ca96 diff --git a/PKGBUILD b/PKGBUILD index 74ba898..5a49b42 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -2,7 +2,7 @@ # Contributor: TBK pkgname=termius -pkgver=9.40.1 +pkgver=9.41.1 pkgrel=1 pkgdesc="Desktop SSH Client" url="https://www.termius.com/" @@ -17,11 +17,11 @@ options=('!strip' '!debug') # curl -H 'X-Ubuntu-Series: 16' https://api.snapcraft.io/api/v1/snaps/details/termius-app | jq '.download_url' -r # curl -H 'X-Ubuntu-Series: 16' https://api.snapcraft.io/api/v1/snaps/details/termius-app | jq '.version' -r source=( - "$pkgname-$pkgver.snap::https://api.snapcraft.io/api/v1/snaps/download/WkTBXwoX81rBe3s3OTt3EiiLKBx2QhuS_264.snap" + "$pkgname-$pkgver.snap::https://api.snapcraft.io/api/v1/snaps/download/WkTBXwoX81rBe3s3OTt3EiiLKBx2QhuS_265.snap" "termius.desktop" "tos.html" ) -sha512sums=('090f995c33fc449ad97e9f9fd46744cbaae878ba248fa3b098370755118d6c3e5d72ed78cf38cae499985f1b2bf81d8d47d91f3e4c50c5c706d0bd024b3f4e8a' +sha512sums=('7ea3f2b6512d8488536dd08ec8ca04ecab0972987c6ae52b47c5aaeaf8647d0beb6a18937767a31a2e8cc6df7ca19e190db430539c6fdc1946d3be4c7b4b766c' 'f1ce576d42a624842c9d08807c11580421b708b4bd7fac3aa9874769735df87566012e8fc0f993b08618f31d2f38588cd83d8572a2700f35d42e2761984ca5d0' '6ac7c082d1adba92dd911f46f9926f702be0f92a9843e6252364477d81364569eeeee9b37170a6d9000fde644588734cb6a11d165fc0aff3dbfbcd6ad353ca96') diff --git a/upd.sh b/upd.sh index 4e3fb17..54db0a2 100755 --- a/upd.sh +++ b/upd.sh @@ -1,18 +1,39 @@ #!/bin/sh +# Update the termius AUR package to the latest snap release. +# Any failing step aborts the script before the git commit. + +set -eu + +cd "$(dirname "$0")" # Get new version info -URL=$(curl -H 'X-Ubuntu-Series: 16' https://api.snapcraft.io/api/v1/snaps/details/termius-app | jq '.download_url' -r | cut -d "_" -f2) -VER=$(curl -H 'X-Ubuntu-Series: 16' https://api.snapcraft.io/api/v1/snaps/details/termius-app | jq '.version' -r) +INFO=$(curl -fsS -H 'X-Ubuntu-Series: 16' https://api.snapcraft.io/api/v1/snaps/details/termius-app) +VER=$(printf '%s\n' "$INFO" | jq -er '.version') +REV=$(printf '%s\n' "$INFO" | jq -er '.download_url' | grep -o '_[0-9]\+\.snap$') + +case $VER in + *[!0-9A-Za-z._+-]*|'') + echo "Unexpected version '$VER'" >&2 + exit 1 + ;; +esac + +# Nothing to do if PKGBUILD is already at this version and committed +if [ "$VER" = "$(sed -n 's/^pkgver=//p' PKGBUILD)" ] \ + && [ -z "$(git status --porcelain -- PKGBUILD .SRCINFO)" ]; then + echo "Already up to date ($VER)" + exit 0 +fi # Update PKGBUILD -sed -i "s/_[0-9]\+.snap/_$URL/g" PKGBUILD -sed -i "s/pkgver=.*$/pkgver=$VER/g" PKGBUILD +sed -i "s/_[0-9]\+\.snap/$REV/g" PKGBUILD +sed -i "s/^pkgver=.*$/pkgver=$VER/" PKGBUILD # Calc new hash updpkgsums # Build & install pkg -makepkg -si +makepkg -sif --noconfirm # Update .SRCINFO makepkg --printsrcinfo > .SRCINFO @@ -24,4 +45,4 @@ git commit -m "Update to $VER" # Cleanup rm -rf pkg/ src/ *.snap *.pkg.tar.zst -printf "\nAll done!\nRemember to git push!\n" +printf '\nAll done!\nRemember to git push!\n'