From d6f9dd1baf7448d5eeefddf118d1c9c790aea2d2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Elan=20Ruusam=C3=A4e?= Date: Fri, 12 Feb 2010 13:19:24 +0000 Subject: [PATCH] - update get-buildlog to fetch recent log with new buildlogs site with build ids - exclude scm dirs in dif(1) Changed files: rpm-build.sh -> 1.61 --- rpm-build.sh | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/rpm-build.sh b/rpm-build.sh index e3db8b9..937ea63 100644 --- a/rpm-build.sh +++ b/rpm-build.sh @@ -129,26 +129,31 @@ get-buildlog() { return fi - local al + local archlist case "$dist" in ac) - al='i686,i586,i386,athlon,alpha,sparc,amd64,ppc' + archlist='i686 i586 i386 athlon alpha sparc amd64 ppc' ;; th) - al='x86_64,athlon,i486,i686,ppc' + archlist='x86_64 i486 i686' ;; *) echo >&2 "get-buildlog: $dist buildlogs are /dev/null" return esac - local u a s=ftp://buildlogs.pld-linux.org - for u in `eval echo $s/$dist/{$al}/{OK,FAIL}/$p.bz2`; do - a=${u#$s/$dist/}; a=${a%%/*} - echo -n "Fetching $u... " - if wget -q $u -O .$p~; then + local url arch ftp=ftp://buildlogs.pld-linux.org + for arch in $archlist; do + [ "$arch" ] || continue + path=${url#$ftp} + echo -n "Checking $p.$arch... " + url=$(lftp -c "debug 0;open $ftp; cls --sort=date -r /$dist/$arch/OK/$p,*.bz2 /$dist/$arch/FAIL/$p,*.bz2 | tail -n1") + url=$ftp$url + + echo -n "$url... " + if wget -q $url -O .$p~; then echo "OK" - mv -f .$p~ $p.$a.bz2 + mv -f .$p~ $p.$arch.bz2 else echo "SKIP" rm -f .$p~ @@ -238,9 +243,9 @@ sfget() { dif() { if [ -t 1 ]; then - diff -ur "$@" | diffcol | less -R + diff -ur -x .svn -x .git -x .bzr -x CVS "$@" | diffcol | less -R else - diff -ur "$@" + diff -ur -x .svn -x .git -x .bzr -x CVS "$@" fi } -- 2.44.0