#! /bin/sh : ${DISTRO:=openSUSE_10.3} : ${ARCH:=x86_64} PACKAGE=${PWD##*/} # Uncomment for initial bootstrap or mass changes: if grep -q "Created by pkg-buildrequires." $PACKAGE-pkg-buildrequires.patch ; then echo "BuildRequires of $PACKAGE is already updated." exit fi osc buildlog $DISTRO $ARCH >$PACKAGE.brqlog if grep ERROR_PKG_BUILDREQUIRES_UPDATE_NEEDED $PACKAGE.brqlog ; then oscquilt start cd SOURCE quilt pop $PACKAGE-pkg-buildrequires.patch # pkg-buildrequires-update ../$PACKAGE.brqlog sh -x ~/OSC/home:sbrabec/pkg-buildrequires/pkg-buildrequires-update ../$PACKAGE.brqlog cd .. oscquilt stop rm -r SOURCE osc ci else echo "No pkg-buildrequires update available for $PACKAGE for $DISTRO $ARCH." fi rm $PACKAGE.brqlog