Skip to content

Commit

Permalink
minor logging fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
viktorbenei committed Sep 24, 2015
1 parent 8982d36 commit 57f127a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion step.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,19 +49,27 @@ function download_file {
local path="$1"
local url="$2"

set +e

curl -Lfso "${path}" "${url}"
local result=$?

if [ ${result} -ne 0 ]; then
echo " (i) Failed to download, retrying..."
sleep 5
curl -Lfso "${path}" "${url}"
local result=$?
if [ ${result} -ne 0 ]; then
path=""
fi
fi

if [[ ! -f "${path}" ]]; then
echo "Failed to download file: #{url}"
echo "Failed to download from: ${url}"
exit 1
fi

set -e
}

echo "Downloading certificate"
Expand Down

0 comments on commit 57f127a

Please sign in to comment.