blob: fb0de850d6fd2db0da3fd170fd7752d0872d0b69 (
plain)
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
42
43
44
45
46
|
#!/bin/sh
script_base_dir=`dirname $0`
if [ $# != 3 ]; then
echo "Usage: $0 GPG_UID DESTINATION CODES"
echo " e.g.: $0 'F10399C0' repositories/ 'lenny unstable hardy karmic'"
exit 1
fi
GPG_UID=$1
DESTINATION=$2
CODES=$3
run()
{
"$@"
if test $? -ne 0; then
echo "Failed $@"
exit 1
fi
}
for code_name in ${CODES}; do
case ${code_name} in
squeeze|wheezy|jessie|unstable)
distribution=debian
;;
*)
distribution=ubuntu
;;
esac
release=${DESTINATION}${distribution}/dists/${code_name}/Release
rm -f ${release}.gpg
gpg2 --sign --detach-sign --armor \
--local-user ${GPG_UID} \
--output ${release}.gpg \
${release} &
if [ "${PARALLEL}" != "yes" ]; then
wait
fi
done
wait
|