tazwok rev 308
Fix update-wok) wok cleaning
author | Antoine Bodin <gokhlayeh@slitaz.org> |
---|---|
date | Fri Feb 18 02:30:04 2011 +0100 (2011-02-18) |
parents | cd06d1768e60 |
children | b3f4dc2fd3d3 |
files | tazwok |
line diff
1.1 --- a/tazwok Fri Feb 18 02:09:34 2011 +0100 1.2 +++ b/tazwok Fri Feb 18 02:30:04 2011 +0100 1.3 @@ -2862,12 +2862,19 @@ 1.4 fi 1.5 fi 1.6 1.7 - # Handle removed packages (removing receipt from wok is enough). 1.8 - for dir in $(ls -d $WOK/*); do 1.9 - [ -d "$dir" ] || rm $WOK/$dir/receipt 1.10 + # Handle removed files/dir. 1.11 + cd $WOK 1.12 + for dir in $(ls -d *); do 1.13 + [ -d "$clean_wok/$dir" ] || rm -r $dir 1.14 + done 1.15 + for file in */receipt */description.txt; do 1.16 + [ -f "$clean_wok/$file" ] || rm -rf $file 1.17 + done 1.18 + for i in $(find */stuff); do 1.19 + [ -e "$clean_wok/$i" ] || rm -rf $i 1.20 done 1.21 1.22 - cp -a * $WOK 1.23 + cp -a $clean_wok/* $WOK 1.24 ;; 1.25 maintainers) 1.26 get_tazwok_config