|
Lines 146-152
sub listfiles {
Link Here
|
| 146 |
} elsif (-f $path) { |
146 |
} elsif (-f $path) { |
| 147 |
my $basename = basename $path; |
147 |
my $basename = basename $path; |
| 148 |
push @it, $path |
148 |
push @it, $path |
| 149 |
if ( not @$filenames or ( grep { $basename =~ /$_/ } @$filenames ) ) |
149 |
if ( not @$filenames or ( grep { $path =~ /$_/ } @$filenames ) ) |
| 150 |
and (!defined $type || $dirent =~ /\.(?:$type)$/) || $action eq 'install'; |
150 |
and (!defined $type || $dirent =~ /\.(?:$type)$/) || $action eq 'install'; |
| 151 |
} elsif (-d $path && $recursive_p) { |
151 |
} elsif (-d $path && $recursive_p) { |
| 152 |
push @it, listfiles($path, $type, $action, $filenames); |
152 |
push @it, listfiles($path, $type, $action, $filenames); |
|
Lines 371-383
if ($action eq 'create') {
Link Here
|
| 371 |
(defined $charset_in? ('-I', $charset_in): ()), |
371 |
(defined $charset_in? ('-I', $charset_in): ()), |
| 372 |
(defined $charset_out? ('-O', $charset_out): ())); |
372 |
(defined $charset_out? ('-O', $charset_out): ())); |
| 373 |
if ($st == 0) { |
373 |
if ($st == 0) { |
| 374 |
# Merge the temporary "pot file" with the specified po file ($str_file) |
374 |
# Merge the temporary "pot file" with the specified po file ($str_file) |
| 375 |
# FIXME: msgmerge(1) is a Unix dependency |
375 |
# FIXME: msgmerge(1) is a Unix dependency |
| 376 |
# FIXME: need to check the return value |
376 |
# FIXME: need to check the return value |
| 377 |
$st = system("msgmerge -U ".($quiet?'-q':'')." -s $str_file $tmpfile2"); |
377 |
if ( @filenames ) { |
|
|
378 |
my ($tmph3, $tmpfile3) = tmpnam(); |
| 379 |
$st = system("msgcat $str_file $tmpfile2 > $tmpfile3"); |
| 380 |
$st = system("msgmerge -U ".($quiet?'-q':'')." -s $str_file $tmpfile3") |
| 381 |
unless $st; |
| 382 |
} else { |
| 383 |
$st = system("msgmerge -U ".($quiet?'-q':'')." -s $str_file $tmpfile2"); |
| 384 |
} |
| 378 |
} else { |
385 |
} else { |
| 379 |
error_normal "Text extraction failed: $xgettext: $!\n", undef; |
386 |
error_normal "Text extraction failed: $xgettext: $!\n", undef; |
| 380 |
error_additional "Will not run msgmerge\n", undef; |
387 |
error_additional "Will not run msgmerge\n", undef; |
| 381 |
} |
388 |
} |
| 382 |
# unlink $tmpfile1 || warn_normal "$tmpfile1: unlink failed: $!\n", undef; |
389 |
# unlink $tmpfile1 || warn_normal "$tmpfile1: unlink failed: $!\n", undef; |
| 383 |
# unlink $tmpfile2 || warn_normal "$tmpfile2: unlink failed: $!\n", undef; |
390 |
# unlink $tmpfile2 || warn_normal "$tmpfile2: unlink failed: $!\n", undef; |
| 384 |
- |
|
|