Skip to content

Commit

Permalink
Update download_file.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
bobimicroweber committed Mar 20, 2024
1 parent 97d844e commit f4c7e90
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion sbin/download_file.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,19 @@ zipDownloadedFile="$3";

echo "Download from url:" "$downloadUrl";

#wget "$downloadUrl" -O "$zipDownloadedFile"

# Retry 100 times
Retry=0
until wget "$downloadUrl" -O "$zipDownloadedFile"; do
printf 'DOWNLOAD....\n'
sleep 2
Retry=$((Retry+1))
if [ $Retry -eq 100 ]; then
echo "Failed to download file after 100 retries"
exit 1
fi
done

echo "Downloaded file:" "$zipDownloadedFile";

wget "$downloadUrl" -O "$zipDownloadedFile"

0 comments on commit f4c7e90

Please sign in to comment.