|
|
-i, --ignore Ignore temporary files from previous runs | -i, --ignore Ignore temporary files from previous runs |
-o, --no-order Do not check the build order | -o, --no-order Do not check the build order |
(Saves time, but may cause breakage.) | (Saves time, but may cause breakage.) |
|
-P, --no-progress Turn off the progress meter |
-q, --quiet Be less verbose (also passed to emerge command) | -q, --quiet Be less verbose (also passed to emerge command) |
-v, --verbose Be more verbose | -v, --verbose Be more verbose |
-u, --no-util UTIL Do not use features provided by UTIL | -u, --no-util UTIL Do not use features provided by UTIL |
|
|
# i: current item | # i: current item |
# n: total number of items to process | # n: total number of items to process |
progress() { | progress() { |
if [[ $quiet ]]; then |
if [[ -t 1 ]]; then |
progress() { :; } |
|
else |
|
progress() { | progress() { |
local curProg=$(( $1 * 100 / $2 )) | local curProg=$(( $1 * 100 / $2 )) |
(( curProg == OLDPROG )) && return # no change, output nothing | (( curProg == OLDPROG )) && return # no change, output nothing |
|
|
echo -ne '\r \r'"[ $curProg% ] $lb" | echo -ne '\r \r'"[ $curProg% ] $lb" |
} | } |
progress $@ | progress $@ |
|
else # STDOUT is not a tty. Disable progress meter. |
|
progress() { :; } |
fi | fi |
} | } |
# Usage: countdown n | # Usage: countdown n |
|
|
-o|--no-order) | -o|--no-order) |
unset ORDER_PKGS | unset ORDER_PKGS |
;; | ;; |
|
-P|--no-progress) |
|
progress() { :; } |
-q|--quiet) | -q|--quiet) |
echo_v() { : ; } |
echo_v() { :; } |
|
progress() { :; } |
quiet=1 | quiet=1 |
EMERGE_OPTIONS+=($1) | EMERGE_OPTIONS+=($1) |
;; | ;; |