#!/bin/bash

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