Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Keep -one- copy of each repo needed
When building, first fetch once per repo,
then clone locally.

japhb++ for inspiration
  • Loading branch information
coke committed Jan 8, 2014
1 parent 08bfae7 commit d805a37
Show file tree
Hide file tree
Showing 8 changed files with 46 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -5,3 +5,4 @@ rakudo.jvm
Pugs.hs
roast
LAST_OUTPUT
repos
33 changes: 33 additions & 0 deletions bin/git.p5
@@ -0,0 +1,33 @@
#!/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 = (
"rakudo" => "https://github.com/rakudo/rakudo.git",
"Pugs.hs" => "https://github.com/perl6/Pugs.hs.git",
"niecza" => "https://github.com/sorear/niecza.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;
qx(git fetch);
chdir "../../";
} else {
chdir $repo_dir;
qx(git clone --mirror $repos{$repo});
chdir "../";
}
}
2 changes: 1 addition & 1 deletion bin/pugs.sh
Expand Up @@ -12,7 +12,7 @@ PATH=/usr/local/bin:$PATH
#

rm -rf Pugs.hs
git clone git://github.com/perl6/Pugs.hs.git
git clone repos/Pugs.hs.git
cd Pugs.hs
ln -s ../../roast t/spec
(cd Pugs && make)
Expand Down
3 changes: 2 additions & 1 deletion bin/rakudo.jvm.sh
Expand Up @@ -4,7 +4,8 @@
PATH=/usr/local/bin:$PATH

rm -rf rakudo.jvm
git clone git://github.com/rakudo/rakudo.git rakudo.jvm
git clone repos/rakudo.git rakudo.jvm
git clone repos/nqp.git rakudo.jvm/nqp
cd rakudo.jvm
ln -s ../../roast t/spec
perl Configure.pl --backends=jvm --gen-nqp
Expand Down
6 changes: 4 additions & 2 deletions bin/rakudo.moar.sh
Expand Up @@ -4,9 +4,11 @@
PATH=/usr/local/bin:$PATH

rm -rf rakudo.moar
git clone -b moar-support git://github.com/rakudo/rakudo.git rakudo.moar
git clone -b moar-support repos/rakudo.git rakudo.moar
git clone repos/nqp.git rakudo.moar/nqp
git clone repos/MoarVM.git rakudo.moar/nqp/MoarVM
cd rakudo.moar
ln -s ../../roast t/spec
ln -s ../roast t/spec
perl Configure.pl --backends=moar --gen-moar=master --gen-nqp=master
make all

Expand Down
4 changes: 3 additions & 1 deletion bin/rakudo.parrot.sh
Expand Up @@ -4,7 +4,9 @@
PATH=/usr/local/bin:$PATH

rm -rf rakudo.parrot
git clone git://github.com/rakudo/rakudo.git rakudo.parrot
git clone repos/rakudo.git rakudo.parrot
git clone repos/nqp.git rakudo.parrot/nqp
git clone repos/parrot.git rakudo.parrot/parrot
cd rakudo.parrot
ln -s ../../roast t/spec
perl Configure.pl --backends=parrot --gen-parrot
Expand Down
3 changes: 1 addition & 2 deletions bin/spec.sh
@@ -1,5 +1,4 @@
#!/bin/sh

rm -rf roast
mkdir roast
git clone git://github.com/perl6/roast.git
git clone repos/roast.git
1 change: 1 addition & 0 deletions doit
@@ -1,4 +1,5 @@
#!/bin/sh
./bin/git.p5
nice -20 ./bin/spec.sh
nice -20 ./bin/pugs.sh
nice -20 ./bin/niecza.sh
Expand Down

0 comments on commit d805a37

Please sign in to comment.