File: get-dm-txt

package info (click to toggle)
dgit 14.4
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 4,396 kB
  • sloc: perl: 14,097; sh: 7,449; makefile: 346; python: 334; tcl: 69
file content (22 lines) | stat: -rwxr-xr-x 457 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh
set -e

cd ${1-/srv/dgit.debian.org/data}
${DGIT_INFRA_GETDMTXT_UMASK-umask 002}

file=dm.txt
server=ftp-master.debian.org
path=$file

certargs=$(git config --default '' \
	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 ! curl $certargs \
		>$file.new https://$server/$path 2>$file.stderr; then
		cat $file.stderr >&2
		exit 127
	fi
	mv -f $file.new $file
"