#!/bin/bash ########################################################################## # Shellscript : Uninstall Script # Autor : Andreas Vogel, macenterprise gmbh, 11.06.2019 ########################################################################## set -x askapp () { /usr/bin/osascript </dev/null set strPath to POSIX file "/Applications/" set f to (choose file with prompt "$1" default location strPath) set posixF to POSIX path of f tell application "Finder" to set filesDir to container of f as alias as text set posixDir to POSIX path of filesDir posixF EOF } asknewdir () { osascript </dev/null tell application "SystemUIServer" activate text returned of (display dialog "$1" default answer "") end tell EOF } app=$(askapp 'Bitte die Xcode Version auswählen') || exit sudo xcode-select -s $app Contents/Developer