regress: automate dependency installation
Added support for Fedora
This commit is contained in:
1 parent
2babc729f7
commit
fa5935a558
1 file changed
+31
@@ -25,6 +25,7 @@ my $sim;
|
||||
my %install_funcs = (
|
||||
'Ubuntu' => \&install_ubuntu_debian,
|
||||
'Debian' => \&install_ubuntu_debian,
|
||||
'Fedora' => \&install_fedora,
|
||||
);
|
||||
our($opt_s, $opt_d);
|
||||
|
||||
@@ -142,6 +143,36 @@ sub install_ubuntu_debian {
|
||||
install_perl_modules(@modules);
|
||||
}
|
||||
|
||||
#
|
||||
# install_fedora:
|
||||
# Install the necessary dependencies for Fedora Core
|
||||
#
|
||||
sub install_fedora {
|
||||
my @pkgs = (
|
||||
'perl-Convert-Binary-C',
|
||||
'perl-Data-HexDump',
|
||||
'perl-Net-Pcap',
|
||||
'perl-Error.noarch',
|
||||
'perl-Module-Build',
|
||||
'libpcap-devel',
|
||||
'perl-List-MoreUtils',
|
||||
'perl-Net-RawIP',
|
||||
);
|
||||
|
||||
# Run yum
|
||||
my @flags = ('-y');
|
||||
if (defined($sim)) {
|
||||
push(@flags, 'info');
|
||||
}
|
||||
else {
|
||||
push(@flags, 'install');
|
||||
}
|
||||
system($yum, @flags, @pkgs);
|
||||
if ($? >> 8 != 0) {
|
||||
die "Error running $yum";
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
# install_perl_modules:
|
||||
# Fetch and install PERL modules
|
||||
|
||||
Reference in new issue
Block a user