fix codetest failure - ASSERT_ARGS does not have a ; after and
[parrot.git] / tools / dev / fetch_languages.pl
blob8ec84a41ac7191dd8b11bbc751b7cbfde7ee8c03
1 # Copyright (C) 2009, Parrot Foundation.
2 # $Id$
4 =head1 NAME
6 fetch_languages.pl - Fetch language implementations from their source code
7 management repositories
9 =head1 SYNOPSIS
11 perl fetch_languages.pl
13 perl fetch_languages.pl [--update] [--lang=<hll>]
16 =head1 DESCRIPTION
18 Creates a directory called 'languages' and checks out the languages.
20 =head1 HISTORY
22 2009-03-14 Salvaged from https:/svn.parrot.org/parrot/trunk/config/gen/makefiles/languages.in@37396.
24 2009-06-28 --lang=<hll> option added by s1n++.
26 =cut
28 use strict;
29 use warnings;
30 use 5.008;
32 use Getopt::Long;
33 use Pod::Usage;
34 use Cwd;
36 my ( $update_flag, $checkout_flag, $lang_flag ) = ( 0, 1, undef );
37 GetOptions( 'lang=s' => \$lang_flag, 'update' => \$update_flag ) or pod2usage();
39 my $languages_dir = 'languages';
40 mkdir $languages_dir;
41 chdir $languages_dir;
43 # some commands
44 my %checkout_cmd = (
45 SVN => [qw(svn checkout)],
46 GIT => [qw(git clone)],
47 HG => [qw(hg clone)],
49 my %update_cmd = (
50 SVN => [qw(svn update)],
51 GIT => [qw(git pull)],
52 HG => [qw(hg pull --update)],
55 my @hlls = (
58 name => 'bf',
59 scm => 'SVN',
60 repository => 'https://svn.parrot.org/languages/bf/trunk'
64 name => 'blizkost',
65 scm => 'GIT',
66 repository => 'git://github.com/jnthn/blizkost.git'
70 name => 'c99',
71 scm => 'SVN',
72 repository => 'https://svn.parrot.org/languages/c99/trunk'
76 name => 'cardinal',
77 scm => 'GIT',
78 repository => 'git://github.com/cardinal/cardinal.git'
82 name => 'chitchat',
83 scm => 'SVN',
84 repository => 'https://svn.parrot.org/languages/chitchat/trunk'
88 name => 'close',
89 scm => 'SVN',
90 repository => 'http://close.googlecode.com/svn/trunk/'
94 name => 'dotnet',
95 scm => 'SVN',
96 repository => 'https://svn.parrot.org/languages/dotnet/trunk'
100 name => 'eclectus',
101 scm => 'GIT',
102 repository => 'git://github.com/bschmalhofer/eclectus.git'
106 name => 'ecmascript',
107 scm => 'SVN',
108 repository => 'https://svn.parrot.org/languages/ecmascript/trunk'
112 name => 'forth',
113 scm => 'SVN',
114 repository => 'https://svn.parrot.org/languages/forth/trunk'
118 name => 'fun',
119 scm => 'GIT',
120 repository => 'git://github.com/TiMBuS/fun.git'
124 name => 'gil',
125 scm => 'GIT',
126 repository => 'git://github.com/tene/gil.git'
130 name => 'hq9plus',
131 scm => 'GIT',
132 repository => 'git://github.com/bschmalhofer/hq9plus.git'
136 name => 'jako',
137 scm => 'SVN',
138 repository => 'https://svn.parrot.org/languages/jako/trunk'
142 name => 'json',
143 scm => 'SVN',
144 repository => 'https://svn.parrot.org/languages/json/trunk'
148 name => 'kea',
149 scm => 'GIT',
150 repository => 'git://github.com/leto/kea.git'
154 name => 'kea-cl',
155 scm => 'SVN',
156 repository => 'https://rgrjr.dyndns.org/svn/kea-cl/trunk'
160 name => 'lazy-k',
161 scm => 'GIT',
162 repository => 'git://github.com/bschmalhofer/lazy-k.git'
166 name => 'lisp',
167 scm => 'SVN',
168 repository => 'https://svn.parrot.org/languages/lisp/trunk'
172 name => 'lolcode',
173 scm => 'SVN',
174 repository => 'https://svn.parrot.org/languages/lolcode/trunk'
178 name => 'lua',
179 scm => 'GIT',
180 repository => 'git://github.com/fperrad/lua.git'
184 name => 'm4',
185 scm => 'GIT',
186 repository => 'git://github.com/bschmalhofer/m4.git'
190 name => 'markdown',
191 scm => 'GIT',
192 repository => 'git://github.com/fperrad/markdown.git'
196 name => 'matrixy',
197 scm => 'GIT',
198 repository => 'git://github.com/Whiteknight/matrixy.git'
202 name => 'ook',
203 scm => 'SVN',
204 repository => 'https://svn.parrot.org/languages/ook/trunk'
208 name => 'paraplegic',
209 scm => 'SVN',
210 repository => 'http://paraplegic.googlecode.com/svn/trunk'
214 name => 'perk',
215 scm => 'GIT',
216 repository => 'git://github.com/chrisdolan/perk.git'
220 name => 'pheme',
221 scm => 'SVN',
222 repository => 'https://svn.parrot.org/languages/pheme/trunk'
226 name => 'pipp',
227 scm => 'GIT',
228 repository => 'git://github.com/bschmalhofer/pipp.git'
232 name => 'pir',
233 scm => 'GIT',
234 repository => 'http://github.com/parrot/pir.git'
238 name => 'pjs',
239 scm => 'SVN',
240 repository => 'http://parrotjs.googlecode.com/svn/trunk'
244 name => 'pod',
245 scm => 'SVN',
246 repository => 'https://svn.parrot.org/languages/pod/trunk'
250 name => 'porcupine',
251 scm => 'SVN',
252 repository => 'http://porcupinepascal.googlecode.com/svn/trunk'
256 name => 'primitivearc',
257 scm => 'GIT',
258 repository => 'git://github.com/stefano/primitivearc.git'
262 name => 'punie',
263 scm => 'SVN',
264 repository => 'https://svn.parrot.org/languages/punie/trunk'
268 name => 'pynie',
269 scm => 'HG',
270 repository => 'http://bitbucket.org/allison/pynie'
274 name => 'rakudo',
275 scm => 'GIT',
276 repository => 'git://github.com/rakudo/rakudo.git'
280 name => 'scheme',
281 scm => 'SVN',
282 repository => 'https://svn.parrot.org/languages/scheme/trunk'
286 name => 'shakespeare',
287 scm => 'HG',
288 repository => 'http://bitbucket.org/riffraff/shakespeare-parrot'
292 name => 'steme',
293 scm => 'GIT',
294 repository => 'git://github.com/tene/steme.git'
298 name => 'tcl',
299 scm => 'GIT',
300 repository => 'git://github.com/partcl/partcl.git'
304 name => 'unlambda',
305 scm => 'GIT',
306 repository => 'git://github.com/bschmalhofer/unlambda.git'
310 name => 'urm',
311 scm => 'SVN',
312 repository => 'https://svn.parrot.org/languages/urm/trunk'
316 name => 'winxed',
317 scm => 'SVN',
318 repository => 'http://winxed.googlecode.com/svn/trunk/'
322 name => 'wmlscript',
323 scm => 'GIT',
324 repository => 'git://github.com/fperrad/wmlscript.git'
328 name => 'xml',
329 scm => 'GIT',
330 repository => 'git://github.com/fperrad/xml.git'
334 foreach (@hlls) {
335 next if $lang_flag && $_->{name} ne $lang_flag;
336 if ($checkout_flag && ! -d $_->{name}) {
337 my @cmd = ( @{ $checkout_cmd{ $_->{scm} } }, $_->{repository}, $_->{name} );
338 my $dir = getcwd();
339 print "Running: '@cmd' in $dir.\n";
340 system(@cmd);
342 if ($update_flag) {
343 chdir $_->{name};
344 my @cmd = ( @{ $update_cmd{ $_->{scm} } } );
345 my $dir = getcwd();
346 print "Running: '@cmd' in $dir.\n";
347 system(@cmd);
348 chdir '..';
352 # Local Variables:
353 # mode: cperl
354 # cperl-indent-level: 4
355 # fill-column: 100
356 # End:
357 # vim: expandtab shiftwidth=4: