tazwok rev 162 3.2

realy clean all file in pkg tree
author Christophe Lincoln <pankso@slitaz.org>
date Sun Apr 18 23:28:07 2010 +0200 (2010-04-18)
parents 184ca30503fe
children e762ec11b0ec
files tazwok
line diff
     1.1 --- a/tazwok	Tue Feb 02 15:21:14 2010 +0100
     1.2 +++ b/tazwok	Sun Apr 18 23:28:07 2010 +0200
     1.3 @@ -1163,39 +1163,21 @@
     1.4  		if grep -q ^clean_wok $RECEIPT; then
     1.5  			clean_wok
     1.6  		fi
     1.7 -		# Remove taz/ and source tree if exists.
     1.8 -		if [ -d "taz" ]; then
     1.9 -			echo -n "Removing taz files..."
    1.10 -			rm -rf taz
    1.11 -			status
    1.12 -		fi
    1.13 -		for i in $PACKAGE-$VERSION $SOURCE-$VERSION ; do
    1.14 -			[ -e "$i" ] || continue
    1.15 -			echo -n "Removing source files..."
    1.16 -			if [ -L $i ]; then
    1.17 -				target=$(readlink $i)
    1.18 -				[ -d "$target" ] && case "$target" in
    1.19 -				/*|.|./*|..|../*);;
    1.20 -				*) rm -rf $target;;
    1.21 +		# Clean shoul only have a receipt, stuff and optionnal desc.
    1.22 +		for f in `ls .`
    1.23 +		do
    1.24 +			case $f in
    1.25 +				receipt|stuff|description.txt)
    1.26 +					continue ;;
    1.27 +				*)
    1.28 +					echo "Removing: $f"
    1.29 +					rm -rf $f ;;
    1.30  				esac
    1.31 -			fi
    1.32 -			rm -rf $i
    1.33 -			status
    1.34  		done
    1.35 -		# Remove an eventual $PACKAGE-build directory.
    1.36 -		if [ -d "$PACKAGE-build" ]; then
    1.37 -			echo -n "Removing build tree..."
    1.38 -			rm -rf $PACKAGE-build && status
    1.39 -		fi
    1.40 -		# Remove process log file.
    1.41 -		if [ -f "process.log" ]; then
    1.42 -			echo -n "Removing process log file..."
    1.43 -			rm process.log && status
    1.44  			echo "================================================================================"
    1.45  		fi
    1.46  		echo "$PACKAGE is clean. You can cook it again..."
    1.47 -		echo ""
    1.48 -		;;
    1.49 +		echo "" ;;
    1.50  	gen-clean-wok)
    1.51  		# Generate a clean wok from the current wok by copying all receipts
    1.52  		# and stuff directory.