[debhelper-devel] [debhelper] 02/02: dh_installexamples: Call pwd at most once
Niels Thykier
nthykier at moszumanska.debian.org
Sat Feb 20 23:22:04 UTC 2016
This is an automated email from the git hooks/post-receive script.
nthykier pushed a commit to branch master
in repository debhelper.
commit 72eb629abb5b2159d52fc0a55a3aeadb8d9e7db5
Author: Niels Thykier <niels at thykier.net>
Date: Sat Feb 20 23:21:54 2016 +0000
dh_installexamples: Call pwd at most once
Signed-off-by: Niels Thykier <niels at thykier.net>
---
dh_installexamples | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dh_installexamples b/dh_installexamples
index 7b28776..cd2fff5 100755
--- a/dh_installexamples
+++ b/dh_installexamples
@@ -63,6 +63,8 @@ init();
# PROMISE: DH NOOP WITHOUT examples
+my $pwd;
+
foreach my $package (@{$dh{DOPACKAGES}}) {
next if is_udeb($package);
@@ -94,9 +96,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
if (-d $example && $exclude) {
my $basename = basename($example);
my $dir = ($basename eq '.') ? $example : "$example/..";
- my $pwd=`pwd`;
- chomp $pwd;
- my $exclude2 = '-type f'.$exclude;
+ chomp($pwd=`pwd`) if not defined($pwd);
complex_doit("cd '$dir' && " .
"find '$basename' -type f$exclude -print0 | LC_ALL=C sort -z | " .
"xargs -0 -I {} cp --reflink=auto --parents -dp {} $pwd/$tmp/usr/share/doc/$package/examples");
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debhelper/debhelper.git
More information about the debhelper-devel
mailing list