|
|
else | else |
progress() { | progress() { |
(( $1 == $2 )) && local lb=$'\n' | (( $1 == $2 )) && local lb=$'\n' |
echo -ne '\r \r' |
new=$(( $1 * 100 / $2 )) |
echo -n "[ $(( $1 * 100 / $2 ))% ] $lb" |
(( $new != $old )) && echo -ne '\r \r' |
|
(( $new != $old )) && echo -n "[ $new% ] $lb" |
|
old=$new |
} | } |
progress $@ | progress $@ |
fi | fi |
|
|
]] | ]] |
| |
get_args "$@" | get_args "$@" |
|
old=0 |
# Use the color preference from portage | # Use the color preference from portage |
export NOCOLOR=$(portageq envvar NOCOLOR) | export NOCOLOR=$(portageq envvar NOCOLOR) |
[[ $NOCOLOR = yes || $NOCOLOR = true ]] && export RC_NOCOLOR=yes # HACK! (grr) | [[ $NOCOLOR = yes || $NOCOLOR = true ]] && export RC_NOCOLOR=yes # HACK! (grr) |