cookutils rev 475 slitaz-tank
libcook.sh: Add strip_blocked function.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Sat Jun 09 14:10:51 2012 +0000 (2012-06-09) |
parents | a1c635a027a7 |
children | 165f297e69f5 |
files | lib/libcook.sh |
line diff
1.1 --- a/lib/libcook.sh Sat Jun 09 08:46:33 2012 +0000 1.2 +++ b/lib/libcook.sh Sat Jun 09 14:10:51 2012 +0000 1.3 @@ -63,3 +63,16 @@ 1.4 echo "$pkg" >> $broken 1.5 fi 1.6 } 1.7 + 1.8 +# Remove blocked (faster this way than grepping before). 1.9 +strip_blocked() { 1.10 + local pkg 1.11 + for pkg in $(cat $blocked) 1.12 + do 1.13 + sed -i /^${pkg}$/d $cooklist 1.14 + PACKAGE="$pkg" 1.15 + for i in $(look_for_rwanted); do 1.16 + sed -i /^${i}$/d $cooklist 1.17 + done 1.18 + done && sed -i /^$/d $cooklist 1.19 +}