@@ -29,3 +29,26 @@ versions_equal () {
29 echo "versions of packages are not all the same!" && exit 1
29 echo "versions of packages are not all the same!" && exit 1
35+ # https://github.com/travis-ci/travis-build/blob/18bd04e965b9bfaa49cd6bdcd8dcb1513b8d2fcd/lib/travis/build/templates/header.sh
38+ while [ $count -le 3 ]; do
39+ [ $result -ne 0 ] && {
40+ echo -e "\n${ANSI_RED}The command \"$@\" failed. Retrying, $count of 3.${ANSI_RESET}\n" >&2
44+ [ $result -eq 0 ] && break
45+ count=$(($count + 1))
49+ [ $count -gt 3 ] && {
50+ echo -e "\n${ANSI_RED}The command \"$@\" failed 3 times.${ANSI_RESET}\n" >&2