#!/bin/bash
# http://crystalfaeries.net/posix/bin/kill_bill
# celeste:crystalfaery <angela@crystalfaeries.net>
# 2013-01-18 23:00:08+00:00 added removal of playonlinux to removal of winetricks and wine.
# 2011-04-10 00:31:29+00:00 original version

echo Remove WINE_Is_Not_an_Emulator configuration and application installations for invoking user:
echo -n Kill Bill? [NO/yes]:
read  confirmation
if [ "$confirmation" == "yes" ]
then
	rm -f	$HOME/.config/menus/applications-merged/wine*
	rm -fr	$HOME/.local/share/applications/wine
	rm -f	$HOME/.local/share/desktop-directories/wine*
	rm -f	$HOME/.local/share/icons/????_*.{xpm,png}
	rm -f	$HOME/.local/share/icons/*-x-wine-*.{xpm,png}
	rm -fr	$HOME/.wine

	echo Remove other users configurations and applications from their home directories:
	echo -n Kill Bill? [NO/yes]:
	read  confirmation
	if [ "$confirmation" == "yes" ]
	then
		sudo rm -f	/home/*/.config/menus/applications-merged/wine*
		sudo rm -fr	/home/*/.local/share/applications/wine
		sudo rm -f	/home/*/.local/share/desktop-directories/wine*
		sudo rm -f	/home/*/.local/share/icons/????_*.{xpm,png}
		sudo rm -f	/home/*/.local/share/icons/*-x-wine-*.{xpm,png}
		sudo rm -fr	/home/*/.wine
	fi

	echo Remove WINE from the system:
	echo -n Kill Bill? [NO/yes]:
	read  confirmation
	if [ "$confirmation" == "yes" ]
	then
		sudo aptitude remove wine winetricks playonlinux || sudo apt-get remove wine winetricks playonlinux
		echo WINE is Dead, Long Live Sir Bill Gates!
	fi

	echo Remove: $0 from the system:
	echo -n Kill Bill? [NO/yes]:
	read  confirmation
	if [ "$confirmation" == "yes" ]
	then
		sudo rm "$0"
		echo "$0 is Dead, and You have forgotten you ever knew of a WINE you didn't like to drink."
	fi
fi



syntax highlighted by Code2HTML, v. 0.9.1