]>
Commit | Line | Data |
---|---|---|
318aa0c3 JR |
1 | #!/bin/sh |
2 | ||
3 | # Before running this script you have to have full-list-distfiles file | |
4 | # in current directory | |
5 | # | |
6 | # Format of full-list-distfiles file: | |
7 | # | |
8 | # cd <path-to-distfiles> | |
9 | # find by-md5 -type f -printf '%p\n' | |
10 | # | |
11 | # DO NOT REMOVE FOLLOWING FILES: | |
12 | # | |
13 | # active-list-distfiles | |
14 | # verified-specs-tags | |
15 | # | |
16 | ||
17 | # | |
18 | CVSROOT=":pserver:baggins@cvs.pld-linux.org:/cvsroot" | |
19 | export CVSROOT | |
20 | ||
21 | LISTFILES="" | |
22 | ||
23 | touch_icons() { | |
24 | ICONS="`awk '/^Icon:/ {print $2}' ${1}`" | |
25 | for i in $ICONS ; do | |
26 | echo GIF87 >$i | |
27 | done | |
28 | } | |
29 | ||
30 | for TAG in $(cat .branches) ; do | |
31 | cvs checkout -r "$TAG" SPECS | |
32 | cvs up -A SPECS/builder | |
33 | ||
34 | cd SPECS | |
35 | for spec in $(find -name "*.spec") ; do | |
36 | grep -sq "$spec:$TAG" ../verified-specs-tags && continue | |
37 | touch_icons "$spec" | |
38 | DF=$(./builder --no-init -sdp -nc -ncs "$spec" || echo $spec >>../list-distfiles-$TAG-errors) | |
39 | for f in $DF ; do | |
40 | echo $f | grep -qsE "^by-md5" || continue | |
41 | echo $f >>../list-distfiles-auto-tags | |
42 | echo $f.desc >>../list-distfiles-auto-tags | |
43 | done | |
44 | echo $spec:$TAG >>../verified-specs-tags | |
45 | done | |
46 | LISTFILES="$LISTFILES list-distfiles-$TAG" | |
47 | cd - | |
48 | rm -rf SPECS | |
49 | done | |
50 | ||
51 | cvs checkout -r 1.1 SPECS | |
52 | cvs up -A SPECS/builder | |
53 | cd SPECS | |
54 | for spec in $(find -name "*.spec") ; do | |
55 | TAGS="$(cvs status -v "${spec}" | awk '!/Sticky Tag:/ && /\(branch:/ || /\(revision/ { print $1 } ' | grep -s -f ../.auto-tags | xargs)" | |
56 | for rev in $TAGS ; do | |
57 | grep -sq "$spec:$rev" ../verified-specs-tags && continue | |
58 | cvs up -r $rev $spec | |
59 | touch_icons "$spec" | |
60 | DF=$(./builder --no-init -sdp -nc -ncs "$spec" || echo $spec >>../list-distfiles-auto-tags-errors) | |
61 | for f in $DF ; do | |
62 | echo $f | grep -qsE "^by-md5" || continue | |
63 | echo $f >>../list-distfiles-auto-tags | |
64 | echo $f.desc >>../list-distfiles-auto-tags | |
65 | done | |
66 | echo $spec:$rev >>../verified-specs-tags | |
67 | done | |
68 | done | |
69 | LISTFILES="$LISTFILES list-distfiles-auto-tags" | |
70 | cd - | |
71 | rm -rf SPECS | |
72 | ||
cfd09567 JR |
73 | sort $LISTFILES active-list-distfiles | uniq >>active-list-distfiles.tmp |
74 | mv -f active-list-distfiles.tmp active-list-distfiles | |
318aa0c3 JR |
75 | rm -f $LISTFILES |
76 | ||
77 | $D=$(date +%Y-%M-%d) | |
d5a0d88b JR |
78 | # List only files that are in full-list-distfiles but |
79 | # not in active-list-distfiles | |
80 | # Just uniq -u is not enough because you can remove files added during | |
81 | # run of the script | |
82 | # B\(A * B) | |
83 | sort active-list-distfiles full-list-distfiles | uniq -d | \ | |
84 | sort - full-list-distfiles | uniq -u >distfiles-remove-$D | |
318aa0c3 JR |
85 | |
86 | cvs commit -m"- $D update" active-list-distfiles verified-specs-tags |