Whoops, sloppy copy
[NixPkgs.git] / pkgs / development / perl-modules / expression-generator / retrieve-file-link.sh
bloba9cf0d94e0d3f2e3d77fd60059fe8c4920782bc4
1 #! /bin/sh
3 module_basename="$1";
4 file_name="$2";
6 version_regexp="${module_basename}(-[0-9.a-z]+){0,1}";
7 author_regexp="[A-Z0-9]+";
9 ./retrieve-modulepage.sh "$module_basename" |
10 egrep "[<]a href=\"[a-z0-9/]*/(${author_regexp}/){0,1}${version_regexp}/${file_name}" |
11 sed -re "s@.*href=\"@@; s@\".*@@" |
12 sed -re 's@^/@http://search.cpan.org/@';
14 echo "$link_line";