mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-09 01:29:03 -05:00
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:
parent
bff8412503
commit
3e72c8cb7e
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user