#! /bin/sh

. /lib/libtaz.sh
. /etc/slitaz/slitaz.conf

	#$(for p in $(tazpkg -l | cut -d ' ' -f1 | sed 's/[^a-z|-]//g');

DIALOG=dialog
exec 3>&1
#a=	grep -Ev 'h|='
aa=$($DIALOG \
	--backtitle "tazpkg -r" \
	--title "" "$@" \
        --checklist "" 30 61 111 \
        $(for p in $(ls $INSTALLED); \
		do echo "$p"; \
		. $INSTALLED/$p/receipt \ 
		echo -e "$VERSION"; \
		echo -e "off" ; \
	done) \
2>&1 1>&3)

retval=$?

echo $aa
#
[ retval = 0 ] || \
for r in $(echo $aa | sed 's/"//g');do echo y | tazpkg -r $r;done	
##| grep VERSION )  | sed 's/[^0-9]//g') \
