Sha256: 50571b112f1fd3f7b8a283f512d5850cf127fd63ba0927d8e00ac3c17495829b

Contents?: true

Size: 492 Bytes

Versions: 13

Compression:

Stored size: 492 Bytes

Contents

travis_retry ()
{
    local result=0
    local count=1
    while [ $count -le 3 ]; do
        [ $result -ne 0 ] && {
            echo -e "\n${ANSI_RED}The command \"$@\" failed. Retrying, $count of 3.${ANSI_RESET}\n" 1>&2
        }
        "$@"
        result=$?
        [ $result -eq 0 ] && break
        count=$(($count + 1))
        sleep 1
    done
    [ $count -gt 3 ] && {
        echo -e "\n${ANSI_RED}The command \"$@\" failed 3 times.${ANSI_RESET}\n" 1>&2
    }
    return $result
}

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
pycall-1.5.1 ci/travis_retry.sh
pycall-1.5.0 ci/travis_retry.sh
pycall-1.4.2 ci/travis_retry.sh
pycall-1.4.1 ci/travis_retry.sh
pycall-1.4.0 ci/travis_retry.sh
pycall-1.3.1 ci/travis_retry.sh
pycall-1.3.0 ci/travis_retry.sh
pycall-1.3.0.dev ci/travis_retry.sh
pycall-1.2.1 ci/travis_retry.sh
pycall-1.2.0 ci/travis_retry.sh
pycall-1.2.0.beta1 ci/travis_retry.sh
pycall-1.1.0.rc1 ci/travis_retry.sh
pycall-1.0.3 ci/travis_retry.sh