summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-09-07 02:27:43 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-09-07 02:27:43 +0000
commit3e72c8cb7eb2daf7419d00a9ff50eda3cbb40db3 (patch)
treec4ace68c0e9c6d25f67c5d9acfa6178aedfb4ecc
parentbff841250357a9aacd1ab308f93159e5bfd99de0 (diff)
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
-rwxr-xr-xmodulemanager2
1 files changed, 2 insertions, 0 deletions
diff --git a/modulemanager b/modulemanager
index 126c74218..2f3d0a505 100755
--- a/modulemanager
+++ b/modulemanager
@@ -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;