Ticket #779 (closed patch: fixed)
[tools] modify fetch_languages.pl to only fetch a specific language
Reported by: | s1n | Owned by: | |
---|---|---|---|
Priority: | trivial | Milestone: | |
Component: | none | Version: | trunk |
Severity: | low | Keywords: | languages |
Cc: | Language: | ||
Patch status: | applied | Platform: | all |
Description
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.
Change History
Note: See
TracTickets for help on using
tickets.