#!/usr/bin/env perl
+
+#
+# InspIRCd -- Internet Relay Chat Daemon
+#
+# Copyright (C) 2008-2009 Robin Burchell <robin+git@viroteck.net>
+#
+# This file is part of InspIRCd. InspIRCd is free software: you can
+# redistribute it and/or modify it under the terms of the GNU General Public
+# License as published by the Free Software Foundation, version 2.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+# details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
+
use strict;
use warnings FATAL => qw(all);
-use LWP::Simple;
-use make::configure;
+use make::utilities;
+
+if (!module_installed("LWP::Simple"))
+{
+ die "Your system is missing the LWP::Simple Perl module!";
+}
+
+if (!module_installed("Crypt::SSLeay") && !module_installed("IO::Socket::SSL"))
+{
+ die "Your system is missing the Crypt::SSLeay or IO::Socket::SSL Perl modules!";
+}
-our @modlist;
+use File::Basename;
+use LWP::Simple;
my %installed;
# $installed{name} = $version
}
close SRC;
-getmodules(1);
-
# determine core version
`./src/version.sh` =~ /InspIRCd-([0-9.]+)/ or die "Cannot determine inspircd version";
$installed{core} = $1;
};
# set up core module list
-for my $modname (@modlist) {
- my $mod = "m_$modname";
- my $modfile = "src/modules/$mod.cpp";
+for my $modname (<src/modules/m_*.cpp>) {
+ my $mod = basename($modname, '.cpp');
my $ver = getmodversion($mod) || '0.0';
$ver =~ s/\$Rev: (.*) \$/$1/; # for storing revision in SVN
$installed{$mod} = $ver;
}
}
-my $action = lc shift @ARGV;
+my $action = $#ARGV > 0 ? lc shift @ARGV : 'help';
if ($action eq 'install') {
for my $mod (@ARGV) {