X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=contrib%2Ffix.8;fp=contrib%2Ffix.8;h=75d5a3845011993bb8d1a6cff1c02eff1e48dba9;hb=9ebfa30b056df56376cb0302a28a190e0aaed765;hp=0000000000000000000000000000000000000000;hpb=ef9466093b9ea65c0a14286123615e195b9c99a9;p=dak.git diff --git a/contrib/fix.8 b/contrib/fix.8 new file mode 100755 index 00000000..75d5a384 --- /dev/null +++ b/contrib/fix.8 @@ -0,0 +1,23 @@ +#!/bin/sh + +total=0 + +for i in $(cat foo.2); do + if [ -f $i -a ! -L $i ]; then + dir=$(dirname $i) + file=$(basename $i) + size=$(du -b $i | cut -f 1) + arch=$(echo $i | sed -e "s#.*binary-\([a-z]*\).*#\1#") + pushd $dir > /dev/null + destdir=/home/troup/removed-from-ftp/badmd5-$arch/ + if [ ! -d $destdir ]; then mkdir $destdir; fi + mv -iv $file $destdir/ + ln -s ../../../../potato/$(echo $i | sed -e "s#.*woody/##") . + popd > /dev/null + total=$(expr $total + $size) + fi +done + +echo +echo "Replaced $total bytes." +