From a55c1f30f05202f6cbf04c8748b3c615b7ad7306 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sat, 20 Mar 2010 23:46:24 +0000 Subject: =?UTF-8?q?Bug=20#309149=20-=20Unify=20look=20of=20eend=20used=20i?= =?UTF-8?q?n=20bash=20&=20python=20code,=20additionally=20fixing=20few=20i?= =?UTF-8?q?nconsistences=20in=20bash=20code.=20Thanks=20to=20Micha=C5=82?= =?UTF-8?q?=20G=C3=B3rny=20=20for=20this=20patch.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit svn path=/main/trunk/; revision=15839 --- bin/isolated-functions.sh | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'bin') diff --git a/bin/isolated-functions.sh b/bin/isolated-functions.sh index 815e4e5d6..630801304 100755 --- a/bin/isolated-functions.sh +++ b/bin/isolated-functions.sh @@ -326,10 +326,10 @@ _eend() { fi if [[ ${RC_ENDCOL} == "yes" ]] ; then - echo -e "${ENDCOL} ${msg}" + echo -e "${ENDCOL} ${msg}" else [[ ${LAST_E_CMD} == ebegin ]] || LAST_E_LEN=0 - printf "%$(( COLS - LAST_E_LEN - 6 ))s%b\n" '' "${msg}" + printf "%$(( COLS - LAST_E_LEN - 7 ))s%b\n" '' "${msg}" fi return ${retval} @@ -397,7 +397,7 @@ get_KV() { } unset_colors() { - COLS="25 80" + COLS=80 ENDCOL= GOOD= @@ -412,13 +412,10 @@ set_colors() { COLS=${COLUMNS:-0} # bash's internal COLUMNS variable (( COLS == 0 )) && COLS=$(set -- $(stty size 2>/dev/null) ; echo $2) (( COLS > 0 )) || (( COLS = 80 )) - COLS=$((${COLS} - 8)) # width of [ ok ] == 7 - # Adjust COLS so that eend works properly on a standard BSD console. - [[ $TERM = cons25 || $TERM = dumb ]] && ((COLS--)) # Now, ${ENDCOL} will move us to the end of the # column; irregardless of character width - ENDCOL=$'\e[A\e['${COLS}'C' + ENDCOL=$'\e[A\e['$(( COLS - 8 ))'C' if [ -n "${PORTAGE_COLORMAP}" ] ; then eval ${PORTAGE_COLORMAP} else -- cgit v1.2.3-1-g7c22