diff options
author | Luke "Jared" Bennett <lbennett@gitlab.com> | 2017-04-26 11:13:42 +0000 |
---|---|---|
committer | Luke "Jared" Bennett <lbennett@gitlab.com> | 2017-04-26 11:13:42 +0000 |
commit | ca6cc6014eed02b2e74bc8ffe65d3c1cc2e511b4 (patch) | |
tree | 2c7f9b643463a69b5010b8942eaa2e3c58fd59c9 /scripts/utils.sh | |
parent | af6e3e57e4c0ee861e26310c65be2e5e8547ca68 (diff) | |
parent | 52bd4b88dc557f0b3c63e82d0f2093f22b28ae9d (diff) | |
download | gitlab-ce-ca6cc6014eed02b2e74bc8ffe65d3c1cc2e511b4.tar.gz |
Merge branch 'master' into 'add-sentry-js-again-with-vue'
# Conflicts:
# config/webpack.config.js
Diffstat (limited to 'scripts/utils.sh')
-rw-r--r-- | scripts/utils.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/scripts/utils.sh b/scripts/utils.sh new file mode 100644 index 00000000000..6faa701f0ce --- /dev/null +++ b/scripts/utils.sh @@ -0,0 +1,14 @@ +retry() { + if eval "$@"; then + return 0 + fi + + for i in 2 1; do + sleep 3s + echo "Retrying $i..." + if eval "$@"; then + return 0 + fi + done + return 1 +} |