summaryrefslogtreecommitdiffstats
path: root/contrib/new-locale.pl
blob: a2feb3dda3c97fa498c8d8d01e3bb6570a962de4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/perl -w

use File::Find;
use File::Copy::Recursive qw(dircopy);

($ARGV[0] && $ARGV[0] =~ /\w\w(-\w\w)?/) || usage();

sub process {
    if ($_ eq 'en' && $File::Find::name !~ /\/data\//) {
        dircopy($_, $ARGV[0]);
    }
}

find(\&process, ".");

sub usage {
    print "Usage: new-locale.pl <lang code>\n";
    print " e.g.: new-locale.pl fr\n";
}