From ce873ef04ff457a5fbb5b5734903326ab12f92bc Mon Sep 17 00:00:00 2001 From: Matt Madia Date: Tue, 20 Jul 2010 17:22:02 +0000 Subject: [PATCH] Added a TODO and commented+untested code for download error handling. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37627 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- data/bin/installoptionalpackage | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/data/bin/installoptionalpackage b/data/bin/installoptionalpackage index 44dea4c9ff..d78f936ee3 100755 --- a/data/bin/installoptionalpackage +++ b/data/bin/installoptionalpackage @@ -145,6 +145,17 @@ function InstallOptionalHaikuImagePackage() archiveFile=\`echo \$3 | sed -s "s/http.*\///"\` if ! [ -f \$archiveFile ] ; then echo "Downloading \$3 ..." + # TODO : add some error handling for downloads + # local attempt=1 + # while [ `wget -nv \$3 2>&1 > /dev/null ; echo \$?` -ne 0 -a $attempt -lt 5 ]; do + # echo "Download attempt #\$attempt failed. Retrying ..." + # rm \$archiveFile + # (( attempt++ )) + # done + # if [ $attempt -ge 5 ]; then + # echo "Max download retries exceeded. Halting installation." + # exit 1 + # fi wget -nv \$3 fi