1
0
mirror of https://github.com/alliedmodders/metamod-source.git synced 2025-02-20 13:54:14 +01:00

Fixed buildbot upload for OS X with horrible workaround (r=dvander).

This commit is contained in:
Scott Ehlert 2010-05-15 18:31:36 -05:00
parent 126f9706d6
commit 970a833176

View File

@ -67,25 +67,33 @@ else
my ($major,$minor) = ($version =~ /^(\d+)\.(\d+)/);
$ftp_path .= "/$major.$minor";
my ($ftp);
$ftp = Net::FTP->new($ftp_host, Debug => 0)
or die "Cannot connect to host $ftp_host: $@";
$ftp->login($ftp_user, $ftp_pass)
or die "Cannot connect to host $ftp_host as $ftp_user: " . $ftp->message . "\n";
if ($ftp_path ne '')
if ($^O eq "darwin")
{
$ftp->cwd($ftp_path)
or die "Cannot change to folder $ftp_path: " . $ftp->message . "\n";
# Horrible workaround for weird upload failure
system("ftp -Vu ftp://$ftp_user:$ftp_pass\@$ftp_host/$ftp_path/$filename $filename");
}
else
{
my ($ftp);
$ftp->binary();
$ftp->put($filename)
or die "Cannot drop file $filename ($ftp_path): " . $ftp->message . "\n";
$ftp = Net::FTP->new($ftp_host, Debug => 0)
or die "Cannot connect to host $ftp_host: $@";
$ftp->close();
$ftp->login($ftp_user, $ftp_pass)
or die "Cannot connect to host $ftp_host as $ftp_user: " . $ftp->message . "\n";
if ($ftp_path ne '')
{
$ftp->cwd($ftp_path)
or die "Cannot change to folder $ftp_path: " . $ftp->message . "\n";
}
$ftp->binary();
$ftp->put($filename)
or die "Cannot drop file $filename ($ftp_path): " . $ftp->message . "\n";
$ftp->close();
}
print "File sent to drop site as $filename -- build succeeded.\n";