diff options
author | Andrey Petrov <andrey.petrov@shazow.net> | 2020-02-02 16:09:06 -0500 |
---|---|---|
committer | Jon <jonringer@users.noreply.github.com> | 2020-02-03 00:57:53 -0800 |
commit | 662589574b82c629a22b949c7c9fc091db9d02ff (patch) | |
tree | fc9179b3294a2e1e3c13a9238803ab3c36a014d6 | |
parent | 0c7a1e7a24f56b1527be7f0ec81fd4e39497f4cb (diff) |
dwarf-fortress: Add update script for themes
-rwxr-xr-x | pkgs/games/dwarf-fortress/themes/update.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/pkgs/games/dwarf-fortress/themes/update.sh b/pkgs/games/dwarf-fortress/themes/update.sh new file mode 100755 index 0000000000000..e052e1536fae1 --- /dev/null +++ b/pkgs/games/dwarf-fortress/themes/update.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env nix-shell +#! nix-shell -i bash -p jq nix coreutils curl nix-prefetch-git + +curl "https://api.github.com/users/dfgraphics/repos" | jq -r '.[].name | ascii_downcase' | while read repo; do + version="$(curl "https://api.github.com/repos/DFgraphics/${repo}/releases/latest" | jq -r .tag_name)" + sha256="$(nix-prefetch-git "https://github.com/DFgraphics/${repo}" "${version}" | jq -r ".sha256")" + echo "{}" | jq ".sha256=\"${sha256}\" | .name=\"${repo}\" | .version=\"${version}\"" +done | jq -s -S . > themes.json |