File: do-all

package info (click to toggle)
debian-keyring 2013.04.21
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 63,116 kB
  • sloc: sh: 510; perl: 256; makefile: 108
file content (41 lines) | stat: -rwxr-xr-x 987 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/bash

BZRTMP=$(mktemp -d -t bzrkeyring.XXXXXXXX)
trap cleanup exit
cleanup () {
        rm -rf "$BZRTMP"
}

for revdate in $(bzr log --line | awk '/Update changelog/ { print $1 $4 }'); do
	rev=${revdate%:*}
	date=${revdate#*:}

	(
		echo Doing revision $rev
		bzr checkout -r$rev . $BZRTMP/$date
		make -C $BZRTMP/$date
		OKD=$BZRTMP/$date/output/keyrings
		if [ -s $OKD/debian-keyring.gpg ]; then
			echo Dumping DDv4 for $date
			dump-ring $OKD/debian-keyring.gpg \
				$date DDv4 >> ~/key-stats
		fi
		if [ -s $OKD/debian-keyring.pgp ]; then
			echo Dumping DDv3 for $date
			dump-ring $OKD/debian-keyring.pgp \
				$date DDv3 >> ~/key-stats
		fi
		if [ -s $OKD/debian-maintainers.gpg ]; then
			echo Dumping DM for $date
			dump-ring $OKD/debian-maintainers.gpg \
				$date DM >> ~/key-stats
		fi
		if [ -s $OKD/debian-nonupload.gpg ]; then
			echo Dumping DN for $date
			dump-ring $OKD/debian-nonupload.gpg \
				$date DN >> ~/key-stats
		fi
		rm -rf $BZRTMP/$date
	)
done