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 | |
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')
-rwxr-xr-x | scripts/update-gcc | 11 | ||||
-rwxr-xr-x | scripts/update-gdb | 11 |
2 files changed, 22 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} diff --git a/scripts/update-gdb b/scripts/update-gdb index fbfaf34..0579d7e 100755 --- a/scripts/update-gdb +++ b/scripts/update-gdb @@ -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}-?.?.50.*.ebuild) +for e in ${ebuilds} ; do + f=$(echo "${e}" | sed -e 's:^gdb-:gdb-weekly-:g' -e 's:.ebuild:.tar.bz2:g') + if grep -q "\<${f}$" ${l} ; then + continue + fi + svn rm ${e} +done + +# Then load new ones. snaps=$(grep -o ${PN}-weekly-'[[:digit:]]'.*.tar.* ${l} | \ sed -e 's:.*-::' -e 's:.tar.*::') |