summaryrefslogtreecommitdiff
path: root/dh_lib
diff options
context:
space:
mode:
authorjoey <joey>1999-08-17 04:37:25 +0000
committerjoey <joey>1999-08-17 04:37:25 +0000
commit1c596507129a7022904405114e2bced37ace1cd7 (patch)
tree544fe77bab29538057a5a186e0512dc5aada7ae4 /dh_lib
parentffe38a05c38d561ff59df28ed52363cf4b578f9c (diff)
downloaddebhelper-1c596507129a7022904405114e2bced37ace1cd7.tar.gz
r24: Initial Import
Diffstat (limited to 'dh_lib')
-rw-r--r--dh_lib17
1 files changed, 6 insertions, 11 deletions
diff --git a/dh_lib b/dh_lib
index 8dad88c5..1b17151d 100644
--- a/dh_lib
+++ b/dh_lib
@@ -3,17 +3,15 @@
# Run a command, and display the command to stdout if verbose mode is on.
# All commands that modifiy files in $TMP should be ran via this
# function.
-# Unfortunatly, this function doesn't work if your command uses redirection,
-# you will have to call verbose_echo by hand then.
doit() {
- verbose_echo "$*"
- $*
+ verbose_echo "$@"
+ eval "$@"
}
# Echo something if the verbose flag is on.
verbose_echo() {
if [ "$DH_VERBOSE" ]; then
- echo " $*"
+ echo " $@"
fi
}
@@ -68,12 +66,9 @@ autoscript() {
fi
# Running doit doesn't cut it here.
- verbose_echo echo "# Automatically added by `basename $0` on `822-date`" ">>" $autoscript_debscript
- echo "# Automatically added by `basename $0` on `822-date`" >> $autoscript_debscript
- verbose_echo sed "$autoscript_sed" $autoscript_filename ">>" $autoscript_debscript
- sed "$autoscript_sed" $autoscript_filename >> $autoscript_debscript
- verbose_echo echo "# End automatically added section" ">>" $autoscript_debscript
- echo "# End automatically added section" >> $autoscript_debscript
+ doit "echo \"# Automatically added by `basename $0` on `822-date`\" >> $autoscript_debscript"
+ doit "sed \"$autoscript_sed\" $autoscript_filename >> $autoscript_debscript"
+ doit "echo '# End automatically added section' >> $autoscript_debscript"
}
# Argument processing and global variable initialization is below.