tazwok rev 158
retry unsuccessfull download with mirror
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Jan 27 15:41:25 2010 +0100 (2010-01-27) |
parents | 1ec5d132dce7 |
children | efa7df06bf04 |
files | tazwok |
line diff
1.1 --- a/tazwok Tue Jan 26 15:22:53 2010 +0000 1.2 +++ b/tazwok Wed Jan 27 15:41:25 2010 +0100 1.3 @@ -307,6 +307,11 @@ 1.4 cd $SOURCES_REPOSITORY 1.5 download $WGET_URL 1.6 #wget $WGET_URL 1.7 + if [ ! -f "$SOURCES_REPOSITORY/$TARBALL" ]; then 1.8 + echo "Download failed, try with mirror copy... " 1.9 + file=$(basename $WGET_URL) 1.10 + download http://mirror.slitaz.org/sources/packages/${file:0:1}/$file 1.11 + fi 1.12 # Exit if download failed to avoid errors. 1.13 if [ ! -f "$SOURCES_REPOSITORY/$TARBALL" ]; then 1.14 echo -e "\nDownload failed, exiting. Please check WGET_URL variable.\n"