3 @ARGV >= 1 || die "Usage: $0 <po directory> [<file pattern>]\n";
5 my $source = shift @ARGV;
6 my $pattern = shift @ARGV || '*.po';
8 if( open F, "find $source -type f -name '$pattern' |" )
10 while( chomp( my $file = readline F ) )
12 my ( $basename ) = $file =~ m{.+/([^/]+)\.po$};
14 if( -f "$source/templates/$basename.pot" )
16 printf "Updating %-40s", $file;
17 system("msgmerge", "-U", "-N", $file, "$source/templates/$basename.pot");