]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Allow comments in sources.list and list files (thanks danieldg)
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>
Sun, 7 Sep 2008 02:27:43 +0000 (02:27 +0000)
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>
Sun, 7 Sep 2008 02:27:43 +0000 (02:27 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10428 e03df62e-2008-0410-955e-edbf42e46eb7

modulemanager

index 126c7421876b57807702213ad32b5732a597e3dd..2f3d0a505a7ce71941119fef271050c949f1c2db 100755 (executable)
@@ -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;