summaryrefslogtreecommitdiff
path: root/modulemanager
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2009-08-14 19:45:30 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2009-08-14 19:45:30 +0000
commita9f3a0a0d4960cbd579e88b3a0e98867c7264a7a (patch)
treec744bcc54052ac317331234cd8cbf3b30254d867 /modulemanager
parent54e04fe36a275d1791595fe2cdf956d92bb671d7 (diff)
Regenerate modules makefile if installing or uninstalling extras modules.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11513 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'modulemanager')
-rwxr-xr-xmodulemanager14
1 files changed, 13 insertions, 1 deletions
diff --git a/modulemanager b/modulemanager
index f98b0a3d1..37aebac9b 100755
--- a/modulemanager
+++ b/modulemanager
@@ -278,11 +278,15 @@ resolve_deps(0);
$| = 1; # immediate print of lines without \n
+# whether or not to invoke ./configure -modupdate after processing
+my $regen_modules_list = 0;
+
print "Processing changes for $action...\n";
for my $mod (keys %installed) {
next if $todo{$mod};
print "Uninstalling $mod $installed{$mod}\n";
unlink "src/modules/$mod.cpp";
+ $regen_modules_list = 1;
}
my $count = scalar keys %todo;
@@ -308,6 +312,7 @@ for my $mod (sort keys %todo) {
} else {
print " - HTTP $stat\n";
}
+ $regen_modules_list = 1;
}
# write database of installed versions
@@ -317,4 +322,11 @@ foreach my $key (keys %mod_versions)
print SRC "$key $mod_versions{$key}\n";
}
close SRC;
-print "Done!\n";
+
+# regenerate makefiles if necessary
+if ($regen_modules_list)
+{
+ print "Done... Re-generating makefiles\n";
+ system "./configure -modupdate";
+}
+print "Finished!\n";