summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2008-11-28 23:35:39 (GMT)
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2008-11-28 23:35:39 (GMT)
commita8fe160e9882650b99110c8aed0d01ba2bebeb7a (patch)
treeab795b614a747526286784e093025ddf843a3ff1
parent0c656b46ba050b5ed80380807b388472bb4a9ca5 (diff)
Backport #1248 from trunk:
- Make it easy to use \n (fixes missing 'n' at the end of on log lines) /branches/1.3/scripts/functions | 5 4 1 0 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
-rw-r--r--scripts/functions5
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/functions b/scripts/functions
index 75b2eaf..a96f245 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -52,6 +52,9 @@ CT_LOG_LEVEL_EXTRA=3
CT_LOG_LEVEL_DEBUG=4
CT_LOG_LEVEL_ALL=5
+# Make it easy to use \n
+CR=$(printf "\n")
+
# A function to log what is happening
# Different log level are available:
# - ERROR: A serious, fatal error occurred
@@ -76,7 +79,7 @@ CT_DoLog() {
cat -
else
echo "${@}"
- fi |( IFS="\n" # We want the full lines, even leading spaces
+ fi |( IFS="${CR}" # We want the full lines, even leading spaces
_prog_bar_cpt=0
_prog_bar[0]='/'
_prog_bar[1]='-'