Mercurial > hg > paul
diff bin/cygclean @ 0:2aa53823fb21
new repo
| author | Henry S. Thompson <ht@inf.ed.ac.uk> |
|---|---|
| date | Sat, 06 Jun 2026 10:19:04 +0100 |
| parents | |
| children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bin/cygclean Sat Jun 06 10:19:04 2026 +0100 @@ -0,0 +1,13 @@ +#!/bin/bash +cd ~/u/Downloads/Cygwin\ setup +pat=http*%3a%2f%2f* +me=$$ +find $pat -type f -print0 | xargs -0 ls -t > ssn$me +find -L oldMirrors/$pat -type f -print0 | xargs -0 ls -t > sso$me +wc -l ss?$me +cat ss?$me | while read f; do echo `basename $f`; done > ssb$me +while read f; do echo ${f%%-[0-9]*}; done < ssb$me | sort | uniq -c | egrep -v ' 1 |setup.ini' | tr -s ' ' ' ' | cut -d ' ' -f 3 | sed 's/+/\\\\+/g' > ssp$me +while read p; do egrep -h "/$p-[0-9]" ss?$me|tail -n +2 ; done <ssp$me | xargs -n 100 rm +find $pat -type f -print0 | xargs -0 ls -t > snn$me +find -L oldMirrors/$pat -type f -print0 | xargs -0 ls -t > sno$me +wc -l sn?$me
