mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-23 06:31:18 +02:00
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:
parent
e5b9621b89
commit
cb5f3ebe52
@ -306,12 +306,12 @@ function die {
|
|||||||
# Retry an emerge command according to $FLAGS_retries
|
# Retry an emerge command according to $FLAGS_retries
|
||||||
# The $EMERGE_JOBS flags will only be added the first time the command is run
|
# The $EMERGE_JOBS flags will only be added the first time the command is run
|
||||||
function eretry () {
|
function eretry () {
|
||||||
$* $EMERGE_JOBS && return 0
|
|
||||||
local i=
|
local i=
|
||||||
for i in $(seq $FLAGS_retries); do
|
for i in $(seq $FLAGS_retries); do
|
||||||
echo Retrying $*
|
echo Retrying $*
|
||||||
$* && return 0
|
$* $EMERGE_JOBS && return 0
|
||||||
done
|
done
|
||||||
|
$* && return 0
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user