* also install make

This commit is contained in:
Jeff Carr 2011-10-27 16:25:31 -04:00
parent 7ec6a71092
commit ff414a4fbe
1 changed files with 30 additions and 0 deletions

View File

@ -15,6 +15,7 @@ if ( ! -d "linux-3.0.8") {
chdir "linux-3.0.8";
system("cp /root/benchmarks/kernel/config-3.0.8 .config");
install_standard("make -v", "make");
install_gcc();
exit if $ARGV[0] eq "--prep";
@ -51,3 +52,32 @@ sub install_gcc {
}
system "gcc --version";
}
sub install_standard {
my ($cmd, $name) = @_;
my $return = system($cmd);
print "gcc RETURN: $return\n";
if ($return eq "-1") {
if (-e "/etc/gentoo-release") {
system "emerge $name";
} elsif (-e "/etc/redhat-release") {
my @parts = split " ", `cat /etc/redhat-release`;
if ($parts[2] eq "5.6") {
my $arch = `uname -m`;
chomp $arch;
if ($arch eq "x86_64") {
system "yum install $name -y";
} else {
system "yum install $name -y";
}
}
system "yum install $name -y";
} else {
system "apt-get -y install $name";
}
} else {
return;
}
system $cmd;
}