chiark / gitweb /
changelog: start 9.13
[dgit.git] / infra / get-dm-txt
1 #!/bin/sh
2 set -e
3
4 cd ${DGIT_INFRA_GETDMTXT_DATADIR-/srv/dgit.debian.org/data}
5 ${DGIT_INFRA_GETDMTXT_UMASK-umask 002}
6
7 file=dm.txt
8 server=ftp-master.debian.org
9 path=$file
10
11 certargs=$(git config dgit-distro.debian.archive-query-tls-curl-ca-args \
12         || (echo >&2 "git config failed"; exit 1))
13
14 with-lock-ex -f $file.lock sh -c "
15         if ! curl $certargs \
16                 >$file.new https://$server/$path 2>$file.stderr; then
17                 cat $file.stderr >&2
18                 exit 127
19         fi
20         mv -f $file.new $file
21 "