Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
grab copies of repos to work with locally
  • Loading branch information
coke committed May 16, 2014
1 parent c35acee commit 2c5ab39
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -1 +1,2 @@
star
repos
34 changes: 34 additions & 0 deletions bin/git.p5
@@ -0,0 +1,34 @@
#!/usr/bin/env perl

# Pull down all the repositories that we need to work with, and
# keep a pristine copy locally.

my $repo_dir = "repos";

if (! -d $repo_dir) {
mkdir $repo_dir;
}

my %repos = (
"star" => "https://github.com/rakudo/star.git",
"rakudo" => "https://github.com/rakudo/rakudo.git",
"parrot" => "https://github.com/parrot/parrot.git",
"roast" => "https://github.com/perl6/roast.git",
"nqp" => "https://github.com/perl6/nqp.git",
"MoarVM" => "https://github.com/MoarVM/MoarVM.git",
);

for my $repo (keys %repos) {
my $dir = $repo_dir . "/" . $repo . ".git" ;
if (-d $dir) {
chdir $dir;
print "Fetching $repo\n";
qx(git fetch);
chdir "../../";
} else {
chdir $repo_dir;
print "Cloning $repo\n";
qx(git clone --mirror $repos{$repo});
chdir "../";
}
}

0 comments on commit 2c5ab39

Please sign in to comment.