3 @ARGV == 2 || die "Usage: $0 <source-dir> <dest-dir>\n";
5 my $source_dir = shift @ARGV;
6 my $target_dir = shift @ARGV;
10 system('mkdir', '-p', $target_dir);
13 if( open F, "find $source_dir -type f -name '*.po' |" )
15 while( chomp( my $file = readline F ) )
17 my ( $lang, $basename ) = $file =~ m{.+/(\w+)/([^/]+)\.po$};
21 printf "Generating %-40s ", "$target_dir/$basename.$lang.lmo";
22 system("./build/po2lmo", $file, "$target_dir/$basename.$lang.lmo");
23 print ( -f "$target_dir/$basename.$lang.lmo" ? "done\n" : "empty\n" );