File: pull-updates

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 (34 lines) | stat: -rwxr-xr-x 490 bytes parent folder | download | duplicates (2)
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
#!/bin/sh

if [ -z "$1" ] || [ -z "$2" ]; then
	echo "Usage: pull-updates keyring dir" >&2
	exit 1
fi

mkdir updates/
scripts/explode-keyring $1 updates/

cd updates
for i in 0x*; do
	if [ ! -e ../$2/$i ]; then
		echo $i no longer exists, removing.
		rm $i
	elif cmp -s $i ../$2/$i; then
		echo $i matches old key version, removing.
		rm $i
	fi
done

echo Updated keys are:
ls

cd ..

for i in updates/0x*; do
	if [ -f $i ]; then
		scripts/update-key $i $2
		rm $i
	fi
done

rmdir updates/