log functions: fix CT_DoLog and CT_DoExecLog

$@ and $* are different when in double quotes; use $* to print the message.
This commit is contained in:
Yann E. MORIN" 2009-09-06 16:49:20 +02:00
parent b7d11da128
commit 9ce2053352

View File

@ -79,7 +79,7 @@ CT_DoLog() {
if [ $# -eq 0 ]; then
cat -
else
printf "${@}\n"
printf "${*}\n"
fi |( IFS="${CR}" # We want the full lines, even leading spaces
_prog_bar_cpt=0
_prog_bar[0]='/'
@ -116,7 +116,7 @@ CT_DoLog() {
CT_DoExecLog() {
local level="$1"
shift
CT_DoLog DEBUG "==> Executing: '${@}'"
CT_DoLog DEBUG "==> Executing: '${*}'"
"${@}" 2>&1 |CT_DoLog "${level}"
}