minimal-x86-64/nixos-minimal-25.05.813814.ac62194c3917-x86_64-linux/nix-store.squashfs.d/crs1ks6b3513ymkmxn8g4iivxz95gvkf-nixos-25.05.813814.ac62194c3917/nixos/pkgs/applications/version-management/sourcehut
Shell changes working directoryExecutes a child process
SHA-256cfe1b6fd4f550871585637fde67acd16b5548c580ef894519534ae4b69f87968
MaleculeH₂(F₂Po₃)
Evidence
1#! /usr/bin/env nix-shell
2#! nix-shell -i bash -p gnused git mercurial common-updater-scripts
3set -eux -o pipefail
4
5cd "$(dirname "${BASH_SOURCE[0]}")" || exit 1
6root=../../../..
7tmp=$(mktemp -d)
8trap 'rm -rf "$tmp"' EXIT
9
10attr_path() {
11 case "$1" in
12 pagessrht) printf "sou …
28:26… 1")"
29 nix-instantiate --eval --strict --expr " with import $root {}; let src = $p.drvAttrs.src; in src.meta.homepage" | tr -d '"'
30}
31
32get_latest_version() {
33 src="$(src_url "$1")"
34 rm -rf "$tmp"
35 if [ "$1" = "hgsrht" ]; then
36 hg clone "$src" "$tmp" >/dev/null
37 printf "%s %s\n" \
38 "$(cd "$tmp" && hg log --limit 1 --template '{latesttag}')" \
39 "$(cd "$tmp" && sed -ne 's/^\s*github\.com\/99designs\/gqlgen v\(.*\)$/\1/p' go.mod)"
40 else
41 git clone "$src" "$tmp" >/dev/null
42 printf "%s %s\n" \
43 "$(cd "$tmp" && git describe "$(git rev-list --tags --max-count=1)")" \
44 …
⋯8 lines
62 while "$retry"; do
63 retry=false;
64 exec < <(exec nix -L build -f "$root" sourcehut.python.pkgs."$1" 2>&1)
65 while IFS=' :' read -r origin hash; do
66 case "$origi …
74:53… en_ver" != "$gqlgen_ver" ]; then
75 git add "$default_nix"
76 git commit -m "sourcehut.$1: $oldVersion -> $version"
77 fi
78}
79
80if [ $# -gt 0 ]; then
81 services=("$@")
82else
83 # Beware that some packages must be updated before others,
84 # eg. buildsrht must be updated before gitsrht,
85 # otherwise this script would enter an infinite loop
86 # because the reported $oldHash to be changed
87 # may not actually be in $default_nix
88 # but in the file of …
90:18… asrht" "pagessrht" "pastesrht" "todosrht" )
91fi
92
93for service in "${services[@]}"; do
94 update_version "$service"
95done