aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMoritz Lenz <moritz@faui2k3.org>2010-06-22 22:03:38 +0200
committerMoritz Lenz <moritz@faui2k3.org>2010-06-22 22:03:38 +0200
commit263f239242615418d0af4ea9f02aaf243f521925 (patch)
treeffc2e7ab6f6f27870ab8e663ac425fd1f525cc4a
parent1836b1826eeefdf646334a4ee1e474f1556159e7 (diff)
inital script for downloading rakudo and modules
-rw-r--r--README7
-rw-r--r--build/download-stuff.pl48
-rw-r--r--dist/.gitignore1
3 files changed, 56 insertions, 0 deletions
diff --git a/README b/README
index f1eb254..dd49d64 100644
--- a/README
+++ b/README
@@ -2,3 +2,10 @@ Rakudo Star -- a Perl 6 distribution based on Rakudo Perl
See <http://wiki.github.com/rakudo/rakudo/whats-going-into-rakudo> for a list
of modules we want included in the distribution.
+
+
+The distribution is built in the dist/ directory. Run
+
+ perl build/download-stuff.pl
+
+to populate it.
diff --git a/build/download-stuff.pl b/build/download-stuff.pl
new file mode 100644
index 0000000..1d7b60d
--- /dev/null
+++ b/build/download-stuff.pl
@@ -0,0 +1,48 @@
+#!/usr/bin/perl
+use strict;
+use warnings;
+
+my @modules = qw(
+ http://github.com/rakudo/rakudo
+ http://github.com/jnthn/zavolaj
+ http://github.com/mberends/fakedbi
+ http://github.com/masak/svg
+ http://github.com/moritz/svg-plot
+ http://github.com/moritz/Math-RungeKutta
+ http://github.com/moritz/Math-Model
+);
+
+chdir 'dist' or die "Can't chdir to build dir: $!";
+
+for my $m (@modules) {
+ my $git_url = $m;
+ $git_url =~ s/^http/git/;
+ $git_url .= '.git';
+ my $return = system 'git', 'clone', $git_url;
+ if ($return) {
+ if ($? == -1) {
+ warn "Error while running 'git clone $git_url': $?\n";
+ } else {
+ warn "Git returned unsuccessfully with return code "
+ . ($? >> 8) . "\n";
+ }
+ next;
+ }
+}
+
+# for projects of which we want to ship specific tags or branches
+# the right-hand side can be anything that 'git checkout' accepts,
+# so a branch name, tag name, sha1 sum, HEAD~3 ( not quite sane,
+# but possible )
+#
+# XXX we want rakudo 2010.07 of course, but that will give an error now
+my %tags = ( rakudo => '2010.06' );
+
+while (my ($project, $version) = each %tags) {
+ chdir $project or die "Can't chdir to '$project': $!";
+ system('git', 'checkout', $version) == 0
+ or die "Can't git checkout $version: $?";
+ chdir '..' or die "Can't chdir back to dist/ folder: $!";
+}
+
+# TODO: copy docs, build scripts, whatever
diff --git a/dist/.gitignore b/dist/.gitignore
new file mode 100644
index 0000000..72e8ffc
--- /dev/null
+++ b/dist/.gitignore
@@ -0,0 +1 @@
+*