SOURCES: rpm-build.sh - add get-buildlog()

glen glen at pld-linux.org
Fri Aug 29 17:37:48 CEST 2008


Author: glen                         Date: Fri Aug 29 15:37:48 2008 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- add get-buildlog()

---- Files affected:
SOURCES:
   rpm-build.sh (1.49 -> 1.50) 

---- Diffs:

================================================================
Index: SOURCES/rpm-build.sh
diff -u SOURCES/rpm-build.sh:1.49 SOURCES/rpm-build.sh:1.50
--- SOURCES/rpm-build.sh:1.49	Tue Jun  3 17:26:09 2008
+++ SOURCES/rpm-build.sh	Fri Aug 29 17:37:42 2008
@@ -111,6 +111,42 @@
 	done
 }
 
+get-buildlog() {
+	local p=$1
+	if [ -z "$p" ]; then
+		echo >&2 "Usage: get-buildlog PACKAGE"
+		echo >&2 ""
+		echo >&2 "Grabs buildlogs from pld builder for all arch."
+		return
+	fi
+
+	local al
+	case "$dist" in
+	ac)
+		al='i686,i586,i386,athlon,alpha,sparc,amd64,ppc'
+		;;
+	th)
+		al='x86_64,athlon,i486,i686,ppc'
+		;;
+	*)
+		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
+			echo "OK"
+			mv -f .$p~ $p.$a.bz2
+		else
+			echo "SKIP"
+			rm -f .$p~
+		fi
+	done
+}
+
 fi # no $dist set
 
 alias cv='cvs status -v'
@@ -207,7 +243,8 @@
 	s,^@@ ,&,;
 	s,^-,&,;
 	s,^+,&,;
-	s,
,^M,g;
+	s,
+,^M,g;
 	s,	,    ,g;
 	s,\([^[:space:]]\)\([[:space:]]\+\)$,\1\2,g;
 	s,$,,
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/rpm-build.sh?r1=1.49&r2=1.50&f=u



More information about the pld-cvs-commit mailing list