chiark / gitweb /
git-debrebase: merge: test suite: Drop check of no wreckage save
[dgit.git] / infra / cgit-regen-config
1 #!/bin/sh
2 set -e
3
4 root=/srv/dgit.debian.org
5
6 repos=$root/unpriv/repos
7 outfile=$root/etc/projects.cgit
8 lockfile=$outfile.lock
9 template=$root/config/cgit-template
10
11 flock $lockfile -c '
12         outfile='"$outfile"'
13         repos='"$repos"'
14         exec >"$outfile.tmp"
15         for ff in "$repos"/[0-9a-z]*.git; do
16                 f=${ff##*/}
17                 p=${f%.git}
18                 cat <<END
19 repo.url=$f
20 repo.path=$repos/$f
21 END
22                 sed "s/%PACKAGE%/$p/g" <'"$template"'
23                 echo
24         done
25         mv -f "$outfile.tmp" "$outfile"
26 '