diff options
author | Peter Powell <petpow@saberuk.com> | 2013-08-15 05:57:46 +0100 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2013-08-18 11:41:43 +0100 |
commit | 3070548ceeffd3c09ce26d816a1d225dbe9d137e (patch) | |
tree | 03139f43d6723876a8c9480a91207de62ed90028 /modulemanager | |
parent | e950f568d0f571e9475aa38177486468714de4d3 (diff) |
Clean up and move various subroutines.
- Fix indentation of get_compiler_info and clean up slightly.
- Move module_installed to make::utilities.
- Remove promptnumeric (unused).
- Rename clean to cmd_clean and rewrite.
- Rename dir_check to prompt_bool and rewrite.
- Rename dumphash to dump_hash.
- Rename getcache to read_configure_cache and rewrite.
- Rename getrevision to get_revision.
- Rename makecache to write_configure_cache and rewrite.
- Rename promptstring_s to prompt_string and rewrite.
- Rename showhelp to cmd_help and rewrite.
- Rename update to cmd_update and rewrite.
- Rename yesno to prompt_bool and rewrite.
- Replace getmodules with a <src/modules/m_*.cpp> glob.
Diffstat (limited to 'modulemanager')
-rwxr-xr-x | modulemanager | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/modulemanager b/modulemanager index 7884654af..9e4670de8 100755 --- a/modulemanager +++ b/modulemanager @@ -22,8 +22,7 @@ use strict; use warnings FATAL => qw(all); -use make::configure; - +use make::utilities; if (!module_installed("LWP::Simple")) { @@ -35,10 +34,9 @@ if (!module_installed("Crypt::SSLeay") && !module_installed("IO::Socket::SSL")) die "Your system is missing the Crypt::SSLeay or IO::Socket::SSL Perl modules!"; } +use File::Basename; use LWP::Simple; -our @modlist; - my %installed; # $installed{name} = $version @@ -128,8 +126,6 @@ while (<SRC>) { } close SRC; -getmodules(1); - # determine core version `./src/version.sh` =~ /InspIRCd-([0-9.]+)/ or die "Cannot determine inspircd version"; $installed{core} = $1; @@ -153,9 +149,8 @@ $modules{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; |