Skip to content

Commit 96e174f

Browse files
committedMar 29, 2017
Minor tweaks to retry utility
1 parent 0347ff5 commit 96e174f

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed
 

‎src/ci/shared.sh

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/bin/false
22
# Copyright 2016 The Rust Project Developers. See the COPYRIGHT
33
# file at the top-level directory of this distribution and at
44
# http://rust-lang.org/COPYRIGHT.
@@ -9,13 +9,16 @@
99
# option. This file may not be copied, modified, or distributed
1010
# except according to those terms.
1111

12+
# This file is intended to be sourced with `. shared.sh` or
13+
# `source shared.sh`, hence the invalid shebang and not being
14+
# marked as an executable file in git.
15+
1216
# See http://unix.stackexchange.com/questions/82598
1317
function retry {
18+
echo "Attempting with retry:" "$@"
1419
local n=1
1520
local max=5
16-
local delay=15
1721
while true; do
18-
echo "Attempting:" "$@"
1922
"$@" && break || {
2023
if [[ $n -lt $max ]]; then
2124
((n++))

0 commit comments

Comments
 (0)
Please sign in to comment.