From 4954bca555776484c6a47326994664dddca9ef70 Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Tue, 27 Nov 2018 01:51:56 +0100 Subject: [PATCH] build: remove unused retry-call script (#14220) --- scripts/retry-call.sh | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 scripts/retry-call.sh diff --git a/scripts/retry-call.sh b/scripts/retry-call.sh deleted file mode 100644 index c40cff768d7..00000000000 --- a/scripts/retry-call.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash - -# Function that can be used to re-call a specific command a specific amount of times if it fails. -# @param ${1} Amount of retry calls -# @param ${2} Code block that will be invoked -function retryCall() { - retries=0 - - until [ ${retries} -gt ${1} ]; do - # Call the command and break the loop if it exits without any errors. - (${2}) && return 0 - - # Increase the counter of the invoked retries. - retries=$[${retries} + 1] - - # Sleep a few seconds and log an info message if there are still remaining retries. - if [ ${retries} -le ${1} ]; then - echo "Script didn't exit without errors. Retrying $[${1} - retries + 1] times..." - sleep 1 - fi - done - - echo "Script exited with errors. Exiting process.." - exit 1 -}