slitaz-arm rev 7

sat: few fix to mirror
author Christophe Lincoln <pankso@slitaz.org>
date Fri May 25 02:28:03 2012 +0200 (2012-05-25)
parents e885f2eb3b08
children 45f11048cf67
files sat
line diff
     1.1 --- a/sat	Fri May 25 00:27:28 2012 +0200
     1.2 +++ b/sat	Fri May 25 02:28:03 2012 +0200
     1.3 @@ -91,7 +91,7 @@
     1.4  			echo -n "Installing: spk ($hg)"
     1.5  			cd $work
     1.6  			[ -d "spk" ] || hg clone $hg/spk >/dev/null
     1.7 -			cd spk
     1.8 +			cd $work/spk
     1.9  			[ "$noup" ] || hg pull -u >/dev/null
    1.10  			make DESTDIR=$distro install >/dev/null
    1.11  			status
    1.12 @@ -190,13 +190,20 @@
    1.13  		echo -n "Checking packages $SUM..."
    1.14  		for pkg in $(cat $work/mirror/packages.list); do
    1.15  			pkg=${pkg}.tazpkg
    1.16 +			if [ ! -f "$pkg" ]; then
    1.17 +				count=$(($count + 1))
    1.18 +				[ "$count" == 1 ] && newline
    1.19 +				echo -n "Fetching: ${pkg}.tazpkg"
    1.20 +				wget -q ${mirror%/}/$pkg
    1.21 +				status
    1.22 +			fi
    1.23  			pkgsum=$($CHECKSUM $pkg)
    1.24  			debug "$pkgsum"
    1.25  			[ "$pkgsum" ] || pkgsum=$$
    1.26  			mirsum=$(fgrep -h $pkgsum packages.$SUM)
    1.27  			debug "$mirsum"
    1.28 -			if [ ! "$pkgsum" == "$mirsum" ] || [ ! -f "$pkg" ] ; then
    1.29 -				count=$($count + 1)
    1.30 +			if [ ! "$pkgsum" == "$mirsum" ]; then
    1.31 +				count=$(($count + 1))
    1.32  				[ "$count" == 1 ] && newline
    1.33  				echo -n "Fetching: ${pkg}.tazpkg"
    1.34  				rm -f $pkg