sourcemod/tools/buildbot/startbuild.pl
David Anderson 2d78224b91 Adding buildbot files back.
--HG--
branch : sourcemod-1.0.x
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/branches/sourcemod-1.0.x%402510
2008-09-06 14:41:38 +00:00

40 lines
526 B
Perl
Executable File

#!/usr/bin/perl
use File::Basename;
my ($myself, $path) = fileparse($0);
chdir($path);
require 'helpers.pm';
chdir('..');
chdir('..');
my ($cmd, $output);
$cmd = Build::PathFormat('tools/builder/builder.exe') . ' build.cfg 2>&1';
if ($^O eq "linux")
{
$cmd = 'mono ' . $cmd;
}
system($cmd);
if ($? == -1)
{
die "Build failed: $!\n";
}
elsif ($^O eq "linux" and $? & 127)
{
die "Build died :(\n";
}
elsif ($? >> 8 != 0)
{
die "Build failed with exit code: " . ($? >> 8) . "\n";
}
else
{
exit(0);
}