2021-04-04 17:25:01 +00:00
|
|
|
#!/usr/bin/env nix-shell
|
|
|
|
#!nix-shell -i bash -p bash jq curl unzip
|
|
|
|
|
|
|
|
set -euo pipefail
|
|
|
|
|
|
|
|
tmpdir="$(mktemp -d)"
|
|
|
|
trap '{ rm -rf -- "$tmpdir"; }' EXIT
|
|
|
|
|
|
|
|
curl -so "$tmpdir/archive.zip" 'https://hg.lukegb.com/api/v4/projects/lukegb%2Fdepot/jobs/artifacts/branch%2Fdefault/download?job=nixCache'
|
|
|
|
unzip -d "$tmpdir" -q -o "$tmpdir/archive.zip"
|
2021-04-04 18:25:02 +00:00
|
|
|
jq -r ".\"$(hostname)\"" "$tmpdir/systems.json"
|