1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/support/buildbot/symstore.pl Tue Nov 18 05:23:58 2008 -0600
1.3 @@ -0,0 +1,64 @@
1.4 +#!/usr/bin/perl
1.5 +
1.6 +use File::Basename;
1.7 +
1.8 +my ($myself, $path) = fileparse($0);
1.9 +chdir($path);
1.10 +
1.11 +require 'helpers.pm';
1.12 +
1.13 +chdir('..');
1.14 +chdir('..');
1.15 +
1.16 +our $SSH = 'ssh -i ../../mmspvkey';
1.17 +
1.18 +#Sync us up with the main symbol store
1.19 +rsync('[email protected]:~/public_html/symbols/', '..\\..\\symstore');
1.20 +
1.21 +#Get version info
1.22 +my ($version);
1.23 +$version = Build::ProductVersion(Build::PathFormat('product.version'));
1.24 +$version .= '-hg' . Build::HgRevNum('.');
1.25 +
1.26 +symstore("loader\\msvc9\\server.*", $version);
1.27 +symstore("core-legacy\\msvc9\\Release\\metamod.1.ep1.*", $version);
1.28 +symstore("core\\msvc9\\Release - Orange Box\\metamod.2.ep2.*", $version);
1.29 +symstore("core\\msvc9\\Release - Left 4 Dead\\metamod.2.l4d.*", $version);
1.30 +
1.31 +#Lowercase DLLs. Sigh.
1.32 +my (@files);
1.33 +opendir(DIR, "..\\..\\symstore");
1.34 +@files = readdir(DIR);
1.35 +closedir(DIR);
1.36 +
1.37 +my ($i, $j, $file, @subdirs);
1.38 +for ($i = 0; $i <= $#files; $i++)
1.39 +{
1.40 + $file = $files[$i];
1.41 + next unless ($file =~ /\.dll$/);
1.42 + next unless (-d "..\\..\\symstore\\$file");
1.43 + opendir(DIR, "..\\..\\symstore\\$file");
1.44 + @subdirs = readdir(DIR);
1.45 + closedir(DIR);
1.46 + for ($j = 0; $j <= $#subdirs; $j++)
1.47 + {
1.48 + next unless ($subdirs[$j] =~ /[A-Z]/);
1.49 + Build::Command("rename ..\\..\\symstore\\$file\\" . $subdirs[$j] . " " . lc($subdirs[$j]));
1.50 + }
1.51 +}
1.52 +
1.53 +#Now that we're done, rsync back.
1.54 +rsync('../../symstore/', '[email protected]:~/public_html/symbols');
1.55 +
1.56 +sub symstore
1.57 +{
1.58 + my ($line, $version) = (@_);
1.59 + Build::Command("symstore add /r /f \"$line\" /s ..\\..\\symstore /t \"Metamod:Source\" /v \"$version\" /c \"buildbot\"");
1.60 +}
1.61 +
1.62 +sub rsync
1.63 +{
1.64 + my ($from, $to) = (@_);
1.65 +
1.66 + Build::Command('rsync -av --delete -e="' . $SSH . '" ' . $from . ' ' . $to);
1.67 +}