r5869 - /scripts/qa/versioncheck-html

dmn at users.alioth.debian.org dmn at users.alioth.debian.org
Thu Jul 19 10:10:46 UTC 2007


Author: dmn
Date: Thu Jul 19 10:10:45 2007
New Revision: 5869

URL: http://svn.debian.org/wsvn/?sc=1&rev=5869
Log:
Handle the case when more than one version is listed on CPAN

Modified:
    scripts/qa/versioncheck-html

Modified: scripts/qa/versioncheck-html
URL: http://svn.debian.org/wsvn/scripts/qa/versioncheck-html?rev=5869&op=diff
==============================================================================
--- scripts/qa/versioncheck-html (original)
+++ scripts/qa/versioncheck-html Thu Jul 19 10:10:45 2007
@@ -61,7 +61,7 @@
 			if egrep -qi '^(ftp|http).+cpan' $DIR/watch; then
 				VER_REGEX=$(egrep '^http|^ftp' $DIR/watch | perl -pe 's{.+/}{}; s/\s.*$//')
 				if [ -n "$VER_REGEX" ]; then
-					UPNEW=$(perl -ne "if(/${VER_REGEX}/){ print \$1; last }" $DIR/cpan)
+					UPNEW=$(perl -ne "if(/${VER_REGEX}/){ \$last_ver = \$1 if \$1 > \$last_ver; } END { print \$last_ver } " $DIR/cpan)
 					if [ -z "$UPNEW" ]; then
 						UPNEW="CPAN contains no /$VER_REGEX/"
 					fi




More information about the Pkg-perl-cvs-commits mailing list