#!/bin/sh # Before running this script you have to have full-list-distfiles file # in current directory # # Format of full-list-distfiles file: # # cd # find by-md5 -type f -printf '%p\n' # # DO NOT REMOVE FOLLOWING FILES: # # active-list-distfiles # verified-specs-tags # # CVSROOT=":pserver:baggins@cvs.pld-linux.org:/cvsroot" export CVSROOT LISTFILES="" touch_icons() { ICONS="`awk '/^Icon:/ {print $2}' ${1}`" for i in $ICONS ; do echo GIF87 >$i done } for TAG in $(cat .branches) ; do cvs checkout -r "$TAG" SPECS cvs up -A SPECS/builder cd SPECS for spec in $(find -name "*.spec") ; do grep -sq "$spec:$TAG" ../verified-specs-tags && continue touch_icons "$spec" DF=$(./builder --no-init -sdp -nc -ncs "$spec" || echo $spec >>../list-distfiles-$TAG-errors) for f in $DF ; do echo $f | grep -qsE "^by-md5" || continue echo $f >>../list-distfiles-auto-tags echo $f.desc >>../list-distfiles-auto-tags done echo $spec:$TAG >>../verified-specs-tags done LISTFILES="$LISTFILES list-distfiles-$TAG" cd - rm -rf SPECS done cvs checkout -r 1.1 SPECS cvs up -A SPECS/builder cd SPECS for spec in $(find -name "*.spec") ; do TAGS="$(cvs status -v "${spec}" | awk '!/Sticky Tag:/ && /\(branch:/ || /\(revision/ { print $1 } ' | grep -s -f ../.auto-tags | xargs)" for rev in $TAGS ; do grep -sq "$spec:$rev" ../verified-specs-tags && continue cvs up -r $rev $spec touch_icons "$spec" DF=$(./builder --no-init -sdp -nc -ncs "$spec" || echo $spec >>../list-distfiles-auto-tags-errors) for f in $DF ; do echo $f | grep -qsE "^by-md5" || continue echo $f >>../list-distfiles-auto-tags echo $f.desc >>../list-distfiles-auto-tags done echo $spec:$rev >>../verified-specs-tags done done LISTFILES="$LISTFILES list-distfiles-auto-tags" cd - rm -rf SPECS sort $LISTFILES active-list-distfiles | uniq >>active-list-distfiles.tmp mv -f active-list-distfiles.tmp active-list-distfiles rm -f $LISTFILES D=$(date +%Y-%M-%d) # List only files that are in full-list-distfiles but # not in active-list-distfiles # Just uniq -u is not enough because you can remove files added during # run of the script # B\(A * B) sort active-list-distfiles full-list-distfiles | uniq -d | \ sort - full-list-distfiles | uniq -u >distfiles-remove-$D cvs commit -m"- $D update" active-list-distfiles verified-specs-tags