]> git.pld-linux.org Git - projects/distfiles.git/blame - cleaner/lister
Fix email headers formatting
[projects/distfiles.git] / cleaner / lister
CommitLineData
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#
18CVSROOT=":pserver:baggins@cvs.pld-linux.org:/cvsroot"
19export CVSROOT
20
21LISTFILES=""
22
23touch_icons() {
24 ICONS="`awk '/^Icon:/ {print $2}' ${1}`"
25 for i in $ICONS ; do
26 echo GIF87 >$i
27 done
28}
29
30for 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
49done
50
51cvs checkout -r 1.1 SPECS
52cvs up -A SPECS/builder
53cd SPECS
54for 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
68done
69LISTFILES="$LISTFILES list-distfiles-auto-tags"
70cd -
71rm -rf SPECS
72
cfd09567
JR
73sort $LISTFILES active-list-distfiles | uniq >>active-list-distfiles.tmp
74mv -f active-list-distfiles.tmp active-list-distfiles
318aa0c3
JR
75rm -f $LISTFILES
76
623c6be5 77D=$(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)
83sort active-list-distfiles full-list-distfiles | uniq -d | \
84 sort - full-list-distfiles | uniq -u >distfiles-remove-$D
318aa0c3
JR
85
86cvs commit -m"- $D update" active-list-distfiles verified-specs-tags
This page took 0.276117 seconds and 4 git commands to generate.