Allow comments in sources.list and list files (thanks danieldg)

git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10428 e03df62e-2008-0410-955e-edbf42e46eb7
This commit is contained in:
w00t 2008-09-07 02:27:43 +00:00
parent bff8412503
commit 3e72c8cb7e

View File

@ -33,6 +33,7 @@ sub parse_url {
my $mod;
for (split /\n+/, $doc) {
s/^\s+//; # ignore whitespace at start
next if /^#/;
if (/^module (\S+) ([0-9.]+) (\S+)/) {
my($name, $ver, $url) = ($1,$2,$3);
if ($modules{$name}{$ver}) {
@ -60,6 +61,7 @@ sub parse_url {
open SRC, 'sources.list' or die "Could not open sources.list: $!";
while (<SRC>) {
next if /^\s*#/;
parse_url($_);
}
close SRC;