#!/bin/bash

cd "`dirname "$0"`"
osascript -e 'tell app "System Events" to display dialog "Do you want to uninstall Lounge Lizard EP-5?" buttons { "Don'"'"'t Uninstall", "Uninstall" } with title "Uninstall Lounge Lizard EP-5"
set button_result to button returned of result
if button_result is equal to "Uninstall" then
    tell me to do shell script "\"'"./uninstall.sh"'\"" with administrator privileges
    tell app "System Events" to display dialog "Lounge Lizard EP-5 was uninstalled." buttons { "Close" } with title "Lounge Lizard EP-5"
end if'
