diff options
author | Mike Frysinger <vapier@gentoo.org> | 2012-09-28 21:07:23 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2012-09-28 21:07:23 +0000 |
commit | 60664f16ee8265d0b95c2d72358c65757e748415 (patch) | |
tree | f73478cb0eec9bd414907b8bc6877dc9ed448327 /scripts/update-gcc | |
parent | drop old snapshots that no longer exist (diff) | |
download | toolchain-60664f16ee8265d0b95c2d72358c65757e748415.tar.gz toolchain-60664f16ee8265d0b95c2d72358c65757e748415.tar.bz2 toolchain-60664f16ee8265d0b95c2d72358c65757e748415.zip |
auto delete old snapshots which are no longer on the servers
Diffstat (limited to 'scripts/update-gcc')
-rwxr-xr-x | scripts/update-gcc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/update-gcc b/scripts/update-gcc index 51a4831..7d8b427 100755 --- a/scripts/update-gcc +++ b/scripts/update-gcc @@ -26,6 +26,17 @@ wget -nv --no-remove-listing -O /dev/null ftp://sources.redhat.com/pub/${PN}/sna l=".listing" sed -i 's/\r$//' ${l} +# First unload ones that no longer exist. +ebuilds=$(echo ${PN}-*_alpha*.ebuild) +for e in ${ebuilds} ; do + v=$(echo "${e}" | sed -e 's:^gcc-::g' -e 's:.ebuild::g' -e 's:.._alpha:-:g') + if grep -q "\<${v}$" ${l} ; then + continue + fi + svn rm ${e} +done + +# Then load new ones. majors=$(awk '$(NF-2) ~ /^LATEST-/ { print gensub("LATEST-", "", "", $(NF-2)) }' ${l}) echo "${PN} majors:" ${majors} |