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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
#!/bin/sh
# Update the copy of the debtags information that is shipped with the package
set -ue
OK=true
# Commit or rollback on exit
commit_or_rollback() {
if [ $OK = true ]
then
mv tags-current.gz.tmp tags-current.gz
cat vocabulary1.tmp vocabulary2.tmp > vocabulary
rm vocabulary1.tmp vocabulary2.tmp
else
rm -f tags-current.gz.tmp vocabulary1.tmp vocabulary2.tmp
fi
}
trap commit_or_rollback EXIT
cat_tags() {
if [ $USER = enrico ] && [ -f ../tagdb/tags ]
then
cat ../tagdb/tags
else
svn cat svn://anonscm.debian.org/debtags/tagdb/tags
fi
}
cat_voc() {
if [ $USER = enrico ] && [ -f ../vocabulary/debian-packages ]
then
cat ../vocabulary/debian-packages
else
svn cat svn://anonscm.debian.org/debtags/vocabulary/trunk/debian-packages
fi
}
echo -n "Exporting a new version of the reviewed tags from SVN... "
if cat_tags | tagcoll copy | gzip -9 > tags-current.gz.tmp
then
echo "ok."
else
echo "failed."
OK=false
exit 1
fi
echo -n "Exporting a new version of the vocabulary data from SVN... "
if cat_voc > vocabulary1.tmp
then
echo "ok."
else
echo "failed."
OK=false
exit 1
fi
echo -n "Exporting a new version of the security team tag vocabulary data from SVN... "
if svn cat svn://anonscm.debian.org/debtags/vocabulary/trunk/security-team > vocabulary2.tmp
then
echo "ok."
else
echo "failed."
OK=false
exit 1
fi
exit 0
|