3 dir=/org/ftp.debian.org/ftp/dists/woody/
5 for component in main non-free contrib; do # non-free contrib
6 for i in $(find $dir/$component/binary-all/ -type f); do
7 new=$(find $dir/$component/binary-i386/ -type f -name $(basename $i | sed -e "s/_.*//")_\*);
8 if [ ! -z "$new" ]; then
9 oldver=$(dpkg-deb -f $i version)
10 newver=$(dpkg-deb -f $new version)
11 if dpkg --compare-versions $oldver gt $newver; then
13 echo $(basename $i) dominates $(basename $new) ???;
15 if dpkg --compare-versions $oldver eq $newver; then
16 #echo $(basename $i) equals $(basename $new);
19 if dpkg --compare-versions $oldver lt $newver; then
20 echo \# $(basename $new) \(arch: any\) DOMINATES $(basename $i) \(arch: all\);
21 echo mv -iv $i ~troup/removed-from-ftp/all/
28 echo \# Cleanup dangling symlinks
29 echo symlinks -rd $dir