1 #!/usr/bin/env nix-shell
2 #!nix-shell -i bash -p curl gnused nix-prefetch jq common-updater-scripts
3 # shellcheck shell=bash
7 info
=$
(nix-prefetch-git
--quiet --url "https://github.com/archlinux/svntogit-packages" --rev "refs/heads/packages/xorg-server")
9 rev=$
(jq
-r '.rev' <<< "$info")
10 sha256
=$
(nix
hash to-sri
--type sha256
"$(jq -r '.sha256' <<< "$info")")
11 dir
=$
(jq
-r '.path' <<< "$info")
13 newXvfbsha
=$
(sha256sum
"$dir/trunk/xvfb-run")
14 oldXvfbsha
=$
(sha256sum
"$(nix build --quiet ".
#xvfb-run.src" --json --no-link | jq -r '.[].outputs.out')/trunk/xvfb-run")
16 if [[ "$newXvfbsha" != "$oldXvfbsha" ]]; then
18 cd "$(git rev-parse --show-toplevel)"
19 update-source-version xvfb-run
"1+g${rev:0:7}" "$sha256" --rev="$rev"