chiark / gitweb /
git fetching: Move lrfetch* down in the file
[dgit.git] / infra / get-dm-txt
index df715d0..0b9ab10 100755 (executable)
@@ -1,18 +1,19 @@
 #!/bin/sh
 set -e
 
-cd /srv/dgit.debian.org/data
+cd ${DGIT_INFRA_GETDMTXT_DATADIR-/srv/dgit.debian.org/data}
+${DGIT_INFRA_GETDMTXT_UMASK-umask 002}
 
 file=dm.txt
 server=ftp-master.debian.org
 path=$file
-cert=/etc/ssl/certs/$server.pem
 
-certargs="--ca-certificate=$cert --ca-directory=/dev/enoent"
+certargs=$(git config dgit-distro.debian.archive-query-tls-curl-ca-args \
+       || (echo >&2 "git config failed"; exit 1))
 
 with-lock-ex -f $file.lock sh -c "
-       if ! wget $certargs \
-               -O $file.new https://$server/$path >$file.stderr 2>&1; then
+       if ! curl $certargs \
+               >$file.new https://$server/$path 2>$file.stderr; then
                cat $file.stderr >&2
                exit 127
        fi