chiark / gitweb /
dgit-repos-server: Make $policy a global
[dgit.git] / infra / get-dm-txt
1 #!/bin/sh
2 set -e
3
4 cd /srv/dgit.debian.org/data
5
6 file=dm.txt
7 server=ftp-master.debian.org
8 path=$file
9 cert=/etc/ssl/certs/$server.pem
10
11 with-lock-ex -f $file.lock sh -c "
12         if ! wget --ca-certificate=$cert --ca-directory=/dev/enoent \
13                 -O $file.new https://$server/$path >$file.stderr 2>&1; then
14                 cat $file.stderr >&2
15                 exit 127
16         fi
17         mv -f $file.new $file
18 "