#!/bin/bash
BASEDIR="/usr/local/winetools"
DIR="/usr/local/share"
VERSION="winetools-0.9"
RELEASE="`echo $VERSION | sed -e "s/winetools-\(.*\)/\1/"`"
echo "Version: $VERSION"
echo "Release: $RELEASE"

#for Debian:
#BASEDIR="/usr/share/winetools"
#DIR="/usr/share"

echo "Uninstalling translations . . ."

cd "$BASEDIR/po"
for i in $( ls  *.po|cut -f1 -d.); do
	rm "$DIR/locale/$i/LC_MESSAGES/wt0.9.mo"
	rm "$DIR/locale/$i/LC_MESSAGES/wt2.mo"
	echo "Uninstalled translation for $i."
done

echo "Uninstalling WineTools from $BASEDIR . . ."
rm -rf "$BASEDIR"
rm /usr/local/bin/wt /usr/local/bin/winetools /usr/local/bin/findwine



echo "WineTools has been uninstalled."
