add sri script for easy updates
TODO: Make this a nix common-updater script.
This commit is contained in:
parent
617822c63e
commit
e5714f305a
1 changed files with 10 additions and 0 deletions
10
nixos/overlays/termius/retrive-latest-sri.sh
Executable file
10
nixos/overlays/termius/retrive-latest-sri.sh
Executable file
|
@ -0,0 +1,10 @@
|
|||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p curl jq nix
|
||||
|
||||
VERSION=$(curl -H 'X-Ubuntu-Series: 16' https://api.snapcraft.io/api/v1/snaps/details/termius-app | jq '.version')
|
||||
DOWNLOAD_URL=$(curl -H 'X-Ubuntu-Series: 16' https://api.snapcraft.io/api/v1/snaps/details/termius-app | jq '.download_url' -r)
|
||||
SHASUM=$(curl -H 'X-Ubuntu-Series: 16' https://api.snapcraft.io/api/v1/snaps/details/termius-app | jq '.download_sha512' -r)
|
||||
SRI512SUM=$(nix-hash --type sha512 --to-sri $SHASUM)
|
||||
|
||||
echo "The latest SRI for version $VERSION is "
|
||||
echo "$SRI512SUM"
|
Loading…
Reference in a new issue