nixpkgs/pkgs/tools/networking/haguichi/update.sh
OPNA2608 a2093d3ff9 haguichi: Add passthru.updateScript
The upstream repo has regular releases and elementaryOS-specific releases.
We only want the regular releases, so filter out the elementaryOS ones in a
custom updateScript.
2023-02-07 17:36:53 +01:00

14 lines
355 B
Bash
Executable File

#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq common-updater-scripts
set -euo pipefail
version="$(
curl -s https://api.github.com/repos/ztefn/haguichi/releases |
jq '.[] | select(.target_commitish!="elementary") | .tag_name' --raw-output |
sort --version-sort --reverse |
head -n1
)"
update-source-version haguichi "$version"