#!/bin/bash
# Small script to move the English localization out of the way,
# enabling the Polish localization.

echo "Attempting to fix FolderGlance localization"
home=~
tgt="$home/Library/PreferencePanes"
lproj="$tgt/FolderGlancePrefs.prefPane/Contents/Resources/English.lproj"
if [ ! -d "$tgt" ] ; then
	echo "The PreferencePanes folder was not found! Is FolderGlance installed globally?"
elif [ -d "$lproj" ] ; then
	mv "$lproj" "$lproj-backup"
	if [ ! $? -eq 0 ] ; then
		echo "There was an error renaming the English localization."
		exit -1
	else
		echo "The English localization was successfully renamed."
	fi
else
	echo "The English localization already appears to be out of the way."
	exit 0
fi

exit 0
