Backport #1248 from trunk: 1.3
author"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Fri Nov 28 23:35:39 2008 +0000 (2008-11-28)
branch1.3
changeset 1084ad280facf7cc
parent 1080 c70053450b4e
child 1085 464ac365eab3
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(-)
scripts/functions
     1.1 --- a/scripts/functions	Tue Nov 25 19:15:34 2008 +0000
     1.2 +++ b/scripts/functions	Fri Nov 28 23:35:39 2008 +0000
     1.3 @@ -52,6 +52,9 @@
     1.4  CT_LOG_LEVEL_DEBUG=4
     1.5  CT_LOG_LEVEL_ALL=5
     1.6  
     1.7 +# Make it easy to use \n
     1.8 +CR=$(printf "\n")
     1.9 +
    1.10  # A function to log what is happening
    1.11  # Different log level are available:
    1.12  #   - ERROR:   A serious, fatal error occurred
    1.13 @@ -76,7 +79,7 @@
    1.14          cat -
    1.15      else
    1.16          echo "${@}"
    1.17 -    fi |( IFS="\n" # We want the full lines, even leading spaces
    1.18 +    fi |( IFS="${CR}" # We want the full lines, even leading spaces
    1.19            _prog_bar_cpt=0
    1.20            _prog_bar[0]='/'
    1.21            _prog_bar[1]='-'