Retry N-1 times with the --jobs flag, then drop it

Review URL: http://codereview.chromium.org/1545043
Patch from Nasser Grainawi <nasserg@quicinc.com>.
This commit is contained in:
Nasser Grainawi 2010-04-21 08:46:49 -06:00 committed by Brian Daugherty
parent e5b9621b89
commit cb5f3ebe52

View File

@ -306,12 +306,12 @@ function die {
# Retry an emerge command according to $FLAGS_retries
# The $EMERGE_JOBS flags will only be added the first time the command is run
function eretry () {
$* $EMERGE_JOBS && return 0
local i=
for i in $(seq $FLAGS_retries); do
echo Retrying $*
$* && return 0
$* $EMERGE_JOBS && return 0
done
$* && return 0
return 1
}