#!/bin/sh

THISDIR=$(dirname "$0")
RESPONSE=$(alert \
"Liblayout needs to be installed into /boot/home/config/lib \
in order for many features of SoundPlay to work. Copy it there?" Cancel OK)

if [ "$RESPONSE" = "OK" ]
then
	if [ -f /boot/home/config/lib/liblayout.so ]
	then
		RESPONSE=$(alert "There is already a copy of liblayout in /boot/home/config/lib. Replace it?" Cancel OK)
		if [ "$RESPONSE" != "OK" ]
		then
			alert "Installation canceled." OK
			exit
		fi
	fi
	cp "$THISDIR/lib/liblayout.so" /boot/home/config/lib
	alert Done OK
else
	alert "Installation canceled." OK
fi
