mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-14 09:43:14 +00:00
57b496ea98
I've tried to be consistent, using four or eight spaces to line up with existing code.
15 lines
377 B
Bash
Executable File
15 lines
377 B
Bash
Executable File
#! /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";
|