#!/bin/bash

cd "`dirname "$0"`"
osascript -e 'tell app "System Events" to display dialog "Do you want to uninstall Ultra Analog Session 2?" buttons { "Don'"'"'t Uninstall", "Uninstall" } with title "Uninstall Ultra Analog Session 2"
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 "Ultra Analog Session 2 was uninstalled." buttons { "Close" } with title "Ultra Analog Session 2"
end if'
