chiark / gitweb /
Infra: Honour archive-query-tls-curl-ca-args
[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
6 file=dm.txt
7 server=ftp-master.debian.org
8 path=$file
9
10 certargs=$(git config dgit-distro.debian.archive-query-tls-curl-ca-args)
11
12 with-lock-ex -f $file.lock sh -c "
13         if ! curl $certargs \
14                 >$file.new https://$server/$path 2>$file.stderr; then
15                 cat $file.stderr >&2
16                 exit 127
17         fi
18         mv -f $file.new $file
19 "