slitaz-base-files rev 324

libtaz.sh: indent status() as orgininaly (so many cmdline tools use it, we must an other way for log files)
author Christophe Lincoln <pankso@slitaz.org>
date Thu Feb 16 08:53:24 2017 +0100 (2017-02-16)
parents 18f5344d488c
children f27c696b0f9e
files rootfs/lib/libtaz.sh
line diff
     1.1 --- a/rootfs/lib/libtaz.sh	Sat Jan 21 16:53:47 2017 +0200
     1.2 +++ b/rootfs/lib/libtaz.sh	Thu Feb 16 08:53:24 2017 +0100
     1.3 @@ -63,7 +63,10 @@
     1.4  	case $output in
     1.5  		raw|gtk) echo " $msg";;
     1.6  		html) echo " <span class=\"float-right color$color\">$msg</span>";;
     1.7 -		*) echo -e "[ \\033[1;${color}m$msg\\033[0;39m ]";;
     1.8 +		*)
     1.9 +			local cols=$(get_cols)
    1.10 +			local scol=$((${cols:-80} - 10))
    1.11 +			echo -e "\\033[${scol}G[ \\033[1;${color}m$msg\\033[0;39m ]";;
    1.12  	esac
    1.13  }
    1.14