66 lines
1.4 KiB
Perl
Executable File
66 lines
1.4 KiB
Perl
Executable File
#!/usr/bin/perl
|
|
|
|
use strict;
|
|
|
|
print "Running on " . `hostname`;
|
|
|
|
my $return = system("screen -list");
|
|
print "screen RETURN: $return\n";
|
|
|
|
if ($return eq "-1") {
|
|
if (-e "/etc/gentoo-release") {
|
|
system "emerge app-misc/screen";
|
|
} elsif (-e "/etc/redhat-release") {
|
|
system "yum install screen -y";
|
|
} else {
|
|
system "apt-get install screen";
|
|
}
|
|
system "ifconfig";
|
|
}
|
|
|
|
my $return = system("bc --version");
|
|
print "bc RETURN: $return\n";
|
|
|
|
if ($return eq "-1") {
|
|
if (-e "/etc/gentoo-release") {
|
|
system "emerge bc";
|
|
} elsif (-e "/etc/redhat-release") {
|
|
system "yum install bc -y";
|
|
} else {
|
|
system "apt-get install bc";
|
|
}
|
|
system "ifconfig";
|
|
}
|
|
|
|
my $return = system("git --version");
|
|
print "git RETURN: $return\n";
|
|
|
|
if ($return eq "-1") {
|
|
if (-e "/etc/gentoo-release") {
|
|
system "emerge git";
|
|
} 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 "rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm";
|
|
} else {
|
|
system "rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm";
|
|
}
|
|
}
|
|
system "yum install git -y";
|
|
} else {
|
|
system "apt-get -y install git";
|
|
}
|
|
system "ifconfig";
|
|
}
|
|
|
|
if ( ! -e "benchmarks") {
|
|
my $return = system("git clone http://69.55.54.91/benchmarks/.git/");
|
|
} else {
|
|
chdir "benchmarks";
|
|
my $return = system("git pull");
|
|
}
|
|
|