#!/bin/bash
# purgeXprotos.sh  
# created and copyrighted: 20 Feb 11
#
# author: Evsiz (evsiz@this-voice.org)
# The author releases this file under the GNU GPL
# license. See GNU's COPYING file for specifics.
#


# consts


# code
LANG=C
export LANG
LC_ALL=C
export LC_ALL

PROTOS=`ls /var/log/packages/*proto-*`
for p in $PROTOS; do 
	grep -q "part of X11" $p ; 
	if [ $? -eq 0 ]; then 
		echo $p
		q=`echo $p | cut -d / -f 5`
		q=`echo $q | cut -d - -f 1`
		if [ "$q" != "xproto" ]; then
			removepkg $p
		fi	
	fi
done
