summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2008-10-15 13:36:23 +0000
committerOlivier Blin <oblin@mandriva.com>2008-10-15 13:36:23 +0000
commitf529f89ca14b4ee7b6b60c27e063bbe108f69bb3 (patch)
tree2fb81a5eb26a952a27237c88faec94e921653800
parentb0729c6d493e440cd9003f994cec9f5144957d2c (diff)
downloaddrakx-f529f89ca14b4ee7b6b60c27e063bbe108f69bb3.tar
drakx-f529f89ca14b4ee7b6b60c27e063bbe108f69bb3.tar.gz
drakx-f529f89ca14b4ee7b6b60c27e063bbe108f69bb3.tar.bz2
drakx-f529f89ca14b4ee7b6b60c27e063bbe108f69bb3.tar.xz
drakx-f529f89ca14b4ee7b6b60c27e063bbe108f69bb3.zip
do not uselessly wait on stdin if no files have to be filtered
-rwxr-xr-xtools/install-xml-file-list8
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/install-xml-file-list b/tools/install-xml-file-list
index 5d43ac9eb..f187f746e 100755
--- a/tools/install-xml-file-list
+++ b/tools/install-xml-file-list
@@ -352,7 +352,7 @@ sub apply_filter {
@l = grep { ! -d $_ } @l;
if (my $subst = $filter->{subst}) {
- system('perl', '-pi', '-e', $subst, @l);
+ system('perl', '-pi', '-e', $subst, @l) if @l;
}
if (my $command = $filter->{command}) {
$command = $initial_dir . "/$command" if $command =~ m!^..?/!;
@@ -363,8 +363,10 @@ sub apply_filter {
if_($command eq 'gzip', '-9f'),
if_($command eq 'strip', '2>/dev/null'),
);
- warn "running $command @options @l\n" if $verbose;
- system(join(' ', $command, @options, @l));
+ if (@l) {
+ warn "running $command @options @l\n" if $verbose;
+ system(join(' ', $command, @options, @l));
+ }
}
}
chdir $initial_dir;