diff options
Diffstat (limited to 'ci/ciimage/common.sh')
| -rw-r--r-- | ci/ciimage/common.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/ci/ciimage/common.sh b/ci/ciimage/common.sh new file mode 100644 index 000000000..c8940df6d --- /dev/null +++ b/ci/ciimage/common.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +### +### Common functions for CI builder files. +### All functions can be accessed in install.sh via: +### +### $ source /ci/common.sh +### + +set -e + +dub_fetch() { + set +e + for (( i=1; i<=24; ++i )); do + dub fetch "$@" + (( $? == 0 )) && break + + echo "Dub Fetch failed. Retrying in $((i*5))s" + sleep $((i*5)) + done + set -e +} |
