summaryrefslogtreecommitdiff
path: root/dh
diff options
context:
space:
mode:
authorBernhard R. Link <brlink@debian.org>2014-12-29 12:35:42 +0100
committerBernhard R. Link <brlink@debian.org>2015-01-07 19:54:17 +0100
commitab9fa9bc99f801ff3a9fadd5f43bf2bf28a423d0 (patch)
tree0776e82e4584e495649e9b5082d1c068ed21dcc0 /dh
parent721ee078ff87d40ae7e421ba8cbc4eed7a3ffe71 (diff)
downloaddebhelper-ab9fa9bc99f801ff3a9fadd5f43bf2bf28a423d0.tar.gz
add DH_QUIET environment variable
Add a DH_QUIET environment variable to make debhelper more silent if set (unless DH_VERBOSE is set). Add new helper functions print_and_doit, print_and_doint_noerror, and nonquiet_print. If DH_QUIET is set, disable printing of dh subcommands to be run. Describe effects DH_QUIET should have in doc/PROGRAMMING.
Diffstat (limited to 'dh')
-rwxr-xr-xdh4
1 files changed, 3 insertions, 1 deletions
diff --git a/dh b/dh
index ece00c41..eceb62e9 100755
--- a/dh
+++ b/dh
@@ -713,7 +713,9 @@ sub run {
# 3 space indent lines the command being run up under the
# sequence name after "dh ".
- print " ".escape_shell($command, @options)."\n";
+ if (!$dh{QUIET}) {
+ print " ".escape_shell($command, @options)."\n";
+ }
return if $dh{NO_ACT};