diff options
author | Niels Thykier <niels@thykier.net> | 2018-11-20 07:45:28 +0000 |
---|---|---|
committer | Niels Thykier <niels@thykier.net> | 2018-11-20 07:45:30 +0000 |
commit | 67feb17cb585def761daa8c33760492fc61f670d (patch) | |
tree | f6e7979f5e421b10dbf2f40dae85f79adec5e2c7 | |
parent | 4f3d9c1cd7bc938978ebfa3ea3097132bcf3d0f8 (diff) | |
download | bash-completion-67feb17cb585def761daa8c33760492fc61f670d.tar.gz |
dh_bash-comp: Use install_{dir,file} instead of doit
The install_{dir,file} variants avoids a fork+exec sequence, which
makes them slightly more efficient.
Signed-off-by: Niels Thykier <niels@thykier.net>
-rwxr-xr-x | debian/extra/debhelper/dh_bash-completion | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/debian/extra/debhelper/dh_bash-completion b/debian/extra/debhelper/dh_bash-completion index 5ee5f0b0..47109ab5 100755 --- a/debian/extra/debhelper/dh_bash-completion +++ b/debian/extra/debhelper/dh_bash-completion @@ -49,9 +49,7 @@ PKG: foreach my $package (@{$dh{DOPACKAGES}}) { my $name; if ($completions) { - if (! -d "$bc_dir") { - doit("install", "-d", "$bc_dir"); - } + install_dir($bc_dir); # try parsing a list of files @install = filedoublearray($completions); @@ -79,7 +77,7 @@ PKG: foreach my $package (@{$dh{DOPACKAGES}}) { if (!@found || !-e $found[0]) { warning "file-list parsing failed, installing as proper snippet"; - doit("install", "-p", "-m644", $completions, "$bc_dir/$package"); + install_file($completions, "$bc_dir/$package"); next PKG } push @filelist, @found; @@ -90,7 +88,7 @@ PKG: foreach my $package (@{$dh{DOPACKAGES}}) { } foreach my $src (@filelist) { - doit("install", "-p", "-m644", $src, "$bc_dir/$name"); + install_file($src, "$bc_dir/$name"); } } } |