#!/bin/_bSE_bash
#---
# Copyright (c) 2008 bitSplit(tm) Enterprises
#---

# called from _bSE_script of the theme package

# required variable:
# PACKAGEPATH

NAME=`_bSE_cat $PACKAGEPATH/Name.txt`
WAIT_FOR_RESTART="please wait for the SpringBoard to restart..."

_bSE_notice \
-t "$NAME" \
-r 3 \
-p "Install" \
-p "Uninstall"  \
-p "Cancel" \
-d 2

case "$?" in
1)
	_bSE_chmod +x $PACKAGEPATH/Install.script

	_bSE_notice \
	-t "$NAME" \
	-b "Installing theme, 
	$WAIT_FOR_RESTART" \
	-a 2

	.$PACKAGEPATH/Install.script
;;

2)
	_bSE_chmod +x $PACKAGEPATH/Restore.script

	_bSE_notice \
	-t "$NAME" \
	-b "Uninstalling theme, 
	$WAIT_FOR_RESTART" \
	-a 2

	.$PACKAGEPATH/Restore.script
;;

*)
	exit 1;
;;
esac

_bSE_notice -t "" -b "Done" -a 1
logout