cookutils rev 177
cook: get source from our mirror if missing (Thank Pascal for the patch)
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Wed May 18 12:33:12 2011 +0200 (2011-05-18) |
parents | 93fff152169d |
children | 405d1f3716ed |
files | cook |
line diff
1.1 --- a/cook Tue May 17 23:05:19 2011 +0200 1.2 +++ b/cook Wed May 18 12:33:12 2011 +0200 1.3 @@ -254,6 +254,13 @@ 1.4 1.5 # Extract source package. 1.6 extract_source() { 1.7 + if [ ! -s "$SRC/$TARBALL" ]; then 1.8 + local url 1.9 + url="http://mirror.slitaz.org/sources/packages" 1.10 + url=$url/${TARBALL:0:1}/$TARBALL 1.11 + gettext "Getting source from mirror:"; echo " $url" 1.12 + busybox wget -c -P $SRC $url || echo -e "ERROR: wget $url" 1.13 + fi 1.14 gettext "Extracting:"; echo " $TARBALL" 1.15 case "$TARBALL" in 1.16 *.tar.gz|*.tgz) tar xzf $SRC/$TARBALL 2>/dev/null ;;