Slightly simplify auto build repository sync.

This commit is contained in:
David Brown 2016-12-07 13:07:21 +00:00
parent 83d943297f
commit 4b0fb0d1fb
2 changed files with 18 additions and 5 deletions

View file

@ -14,13 +14,13 @@ my %machines = (
"darwin" => ['dave@dcb', "sudo", "projects/oberon/vishap/voc", "make full"],
"cygwin" => ['-p5932 dave@wax', "", "oberon/cygwin/voc", "export CC=gcc && make full;"
. "cd ~;"
. "sh start64.sh \\\"cd oberon/cygwin/voc && git reset --hard && git clean -dfx &&"
. "git pull && git checkout $branch && git pull;"
. "sh start64.sh \\\"cd oberon/cygwin/voc &&"
. "src/tools/make/getbranch $branch &&"
. "export CC=gcc && make full;\\\""],
"mingw" => ['-p5932 dave@wax', "", "oberon/mingw/voc", "export CC=i686-w64-mingw32-gcc && make full;"
. "cd ~;"
. "sh start64.sh \\\"cd oberon/mingw/voc && git reset --hard && git clean -dfx &&"
. "git pull && git checkout $branch && git pull;"
. "git pull && git checkout -f $branch && git pull;"
. "export CC=x86_64-w64-mingw32-gcc && make full;\\\""],
"android" => ['-p8022 root@and', "", "vishap/voc", "export CC=gcc && make full"],
"lub64" => ['dave@vim', "sudo", "oberon/voc", "make full"],
@ -62,8 +62,7 @@ unlink glob "log/*";
for my $machine (sort keys %machines) {
my ($login, $sudo, $dir, $mkcmd) = @{$machines{$machine}};
my $cmd = "ssh $login \"cd $dir && $sudo git reset --hard && $sudo git clean -dfx &&"
. "$sudo git pull && $sudo git checkout -f $branch && $sudo git pull && $sudo $mkcmd\" ";
my $cmd = "ssh $login \"cd $dir && src/tools/make/getbranch $branch && $sudo $mkcmd\" ";
logged($cmd, $machine);
}

View file

@ -0,0 +1,14 @@
#!perl -w
use strict;
use warnings;
# Exit with a clean enlistrment in the named branch.
my $branch = "master";
if (defined($ARGV[0]) && ($ARGV[0] ne "")) {$branch = $ARGV[0]}
set -x
git reset --hard # Clear the staging area
git clean -dfx # Remove all untracked files
git pull # Update the local repository
git checkout -f $branch # Switch to requested branch