Added a generator for CPAN expressions. Expressions often require manual editing, but still something..

svn path=/nixpkgs/trunk/; revision=11947
This commit is contained in:
Michael Raskin
2008-06-02 08:21:38 +00:00
parent 8b83b37ec5
commit b98a144355
12 changed files with 196 additions and 0 deletions
@@ -0,0 +1,14 @@
#! /bin/sh
module_basename="$1";
file_name="$2";
version_regexp="${module_basename}(-[0-9.a-z]+){0,1}";
author_regexp="[A-Z0-9]+";
./retrieve-modulepage.sh "$module_basename" |
egrep "[<]a href=\"[a-z0-9/]*/(${author_regexp}/){0,1}${version_regexp}/${file_name}" |
sed -re "s@.*href=\"@@; s@\".*@@" |
sed -re 's@^/@http://search.cpan.org/@';
echo "$link_line";