tazwok rev 330

Fix update-wok (again)
author Antoine Bodin <gokhlayeh@slitaz.org>
date Sun Feb 20 16:15:13 2011 +0100 (2011-02-20)
parents 920447130d38
children 9c8e898aac33
files tazwok
line diff
     1.1 --- a/tazwok	Sun Feb 20 09:33:41 2011 +0000
     1.2 +++ b/tazwok	Sun Feb 20 16:15:13 2011 +0100
     1.3 @@ -2868,17 +2868,17 @@
     1.4  						echo "" >&2
     1.5  						echo "You need to install mercurial to get wok from hg (recommended). Oherwise, you can switch wok get method to \"tarball\" into $LOCAL_RESOSITORY/tazwok.conf (per-repository configuration, it not always exists) or /etc/slitaz/tazwok.conf (global configuration)." | fold -s >&2
     1.6  						echo "">&2
     1.7 +						exit 1
     1.8  					else
     1.9  						tazpkg get-install mercurial
    1.10  					fi
    1.11 +				fi
    1.12  
    1.13 +				report step "Getting wok changes using hg"
    1.14 +				if [ -d .hg ]; then
    1.15 +					hg pull -u || exit 1
    1.16  				else
    1.17 -					report step "Getting wok changes using hg"
    1.18 -					if [ -d .hg ]; then
    1.19 -						hg pull -u || exit 1
    1.20 -					else
    1.21 -						hg clone $HG_WOK . || exit 1
    1.22 -					fi
    1.23 +					hg clone $HG_WOK . || exit 1
    1.24  				fi
    1.25  				report end-step
    1.26  				[ -x /usr/bin/clean-chroot ] && clean-chroot
    1.27 @@ -2906,15 +2906,12 @@
    1.28  		# Handle removed files/dir.
    1.29  		cd $WOK	
    1.30  		for dir in *; do
    1.31 -			[ -d $dir ] || continue
    1.32  			[ -d "$clean_wok/$dir" ] || rm -rf $dir
    1.33  		done
    1.34  		for file in */receipt */description.txt; do
    1.35 -			[ -f $file ] || continue
    1.36  			[ -f "$clean_wok/$file" ] || rm -rf $file
    1.37  		done
    1.38 -		for i in $(find */stuff); do
    1.39 -			[ -e $i ] || continue
    1.40 +		for i in $(find */stuff 2>/dev/null); do
    1.41  			[ -e "$clean_wok/$i" ] || rm -rf $i
    1.42  		done
    1.43  
    1.44 @@ -3263,4 +3260,4 @@
    1.45  esac
    1.46  
    1.47  report stop 2>/dev/null
    1.48 -exit 0
    1.49 \ No newline at end of file
    1.50 +exit 0