tazwok rev 53 1.7

$WGET_URL now support more than one URL.
author Eric Joseph-Alexandre <erjo@slitaz.org>
date Sat Mar 22 01:24:47 2008 +0100 (2008-03-22)
parents 3e5bacdae213
children c03d1412e69e
files tazwok
line diff
     1.1 --- a/tazwok	Tue Mar 18 12:31:04 2008 +0100
     1.2 +++ b/tazwok	Sat Mar 22 01:24:47 2008 +0100
     1.3 @@ -227,6 +227,12 @@
     1.4  		esac
     1.5  	fi
     1.6  }
     1.7 +download()
     1.8 +{
     1.9 +	for file in $@; do
    1.10 +		wget $file && break
    1.11 +	done
    1.12 +}
    1.13  
    1.14  # Configure and make a package with the receipt.
    1.15  compile_package()
    1.16 @@ -255,7 +261,8 @@
    1.17  		echo "Checking for source tarball... "
    1.18  		if [ ! -f "$SOURCES_REPOSITORY/$TARBALL" ]; then
    1.19  			cd $SOURCES_REPOSITORY
    1.20 -			wget $WGET_URL
    1.21 +			download $WGET_URL
    1.22 +			#wget $WGET_URL
    1.23  			# Exit if download failed to avoid errors.
    1.24  			if [ ! -f "$SOURCES_REPOSITORY/$TARBALL" ]; then
    1.25  				echo -e "\nDownload failed, exiting. Please check WGET_URL variable.\n"