On Fri, Dec 23, 2005 at 04:47:22PM -0500, Ignacio Vazquez-Abrams wrote: > Here's a script I threw together to list all the packages owned by > e-mail address. Nice. While we're sharing, here's a script I wrote to check the status of all the perl packages I'm the owner of. It compares the version of the package in the spec file to the version of the module on CPAN. Fixing the hard-coded values is left as an exercise for the reader. ;) Steve -- Steven Pritchard - K&S Pritchard Enterprises, Inc. Email: steve@xxxxxxxxx http://www.kspei.com/ Phone: (618)398-3000 Mobile: (618)567-7320
#!/bin/sh set -e wget="wget -q" cvs="cvs -q -z1" me="steve@xxxxxxxxx" owners=/home/steve/src/fedora/extras/owners rpms=/home/steve/src/fedora/extras/rpms CPAN=${CPAN:-"http://www.cpan.org"} packages=$HOME/.cpan/sources/modules/02packages.details.txt.gz mkdir -p $( dirname $packages ) echo "Updating CPAN package details..." $wget -N -O $packages $CPAN/modules/$( basename $packages ) cd $owners echo "Updating owners.list from Fedora Extras CVS..." $cvs up for package in $( grep $me owners.list | cut -d'|' -f2 | grep '^perl-' ) ; do echo "Updating $package..." ( cd $rpms && $cvs up $package ) echo "Checking $package..." if [ ! -d $rpms/$package/devel ] ; then echo " - No devel/, skipping..." continue fi module=$( echo $package | sed 's,^perl-,,;s/-/::/g' ) cpanversion=$( zgrep '^'$module' ' $packages | awk '{print $2}' ) pkgversion=$( grep '^Version:' $rpms/$package/devel/$package.spec \ | awk '{print $2}' ) if [ $cpanversion != $pkgversion ] ; then echo " *** MISMATCH: devel is $pkgversion, CPAN is $cpanversion." >&2 else echo "$package is up-to-date!" fi done # vi: set ai et:
-- fedora-extras-list mailing list fedora-extras-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/fedora-extras-list