#!/bin/sh

THISDIR=$(dirname "$0")
RESPONSE=$(alert \
"Do you want to install the Magyar language file \
for People.iro?" Cancel OK)

if [ "$RESPONSE" = "OK" ]
then
	if [ -d /boot/home/config/settings/People.iro/Languages ]
	then
		cp "$THISDIR/Magyar" /boot/home/config/settings/People.iro/Languages
		alert Done OK
	else
		RESULT=$(alert "Language folder does not exist.s Do you wish to create it?" Cancel OK)
		if [ "$RESULT"  = "OK" ]
		then
			if [ ! -d /boot/home/config/settings/People.iro ]
			then
				mkdir /boot/home/config/settings/People.iro
			fi
			mkdir /boot/home/config/settings/People.iro/Languages
			cp "$THISDIR/Magyar" /boot/home/config/settings/People.iro/Languages
			alert Done OK
		else
			alert "Installation canceled." OK
		fi
	fi
else
	alert "Installation canceled." OK
fi
