#779: [tools] modify fetch_languages.pl to only fetch a specific language
-------------------+--------------------------------------------------------
 Reporter:  s1n    |        Type:  patch  
   Status:  new    |    Priority:  trivial
Milestone:         |   Component:  none   
  Version:  trunk  |    Severity:  low    
 Keywords:         |        Lang:         
    Patch:         |    Platform:  all    
-------------------+--------------------------------------------------------
 In some cases, only a specific language is desired (and not all). The
 following is a patch to allow a --lang option to specify 1 language (i.e.
 --lang c99):

 {{{
 Index: tools/dev/fetch_languages.pl
 ===================================================================
 --- tools/dev/fetch_languages.pl        (revision 39599)
 +++ tools/dev/fetch_languages.pl        (working copy)
 @@ -29,8 +29,8 @@
  use Pod::Usage;
  use Cwd;

 -my ( $update_flag, $checkout_flag ) = ( 0, 1 );
 -GetOptions( 'update' => \$update_flag ) or pod2usage();
 +my ( $update_flag, $checkout_flag, $lang_flag ) = ( 0, 1, undef );
 +GetOptions( 'lang=s' => \$lang_flag, 'update' => \$update_flag ) or
 pod2usage();

  my $languages_dir = 'languages';
  mkdir $languages_dir;
 @@ -304,6 +304,7 @@
  );

  foreach (@hlls) {
 +    next if $lang_flag && $_->{name} ne $lang_flag;
      if ($checkout_flag && ! -d $_->{name}) {
          my @cmd = ( @{ $checkout_cmd{ $_->{scm} } }, $_->{repository},
 $_->{name} );
          my $dir = getcwd();
 }}}

 Note this is against r39599.

-- 
Ticket URL: <https://trac.parrot.org/parrot/ticket/779>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets

Reply via email to