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 f4c7e90 commit f897142
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions sbin/download_file.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,6 @@ 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" 1>/dev/null 2>&1 &

echo "File is downloaded:" "$zipDownloadedFile";

0 comments on commit f897142

Please sign in to comment.