17 lines
569 B
Bash
Executable File
17 lines
569 B
Bash
Executable File
#!/bin/bash
|
|
|
|
current_user=$(/usr/sbin/scutil <<< "show State:/Users/ConsoleUser" | /usr/bin/awk -F': ' '/[[:space:]]+Name[[:space:]]:/ { if ( $2 != "loginwindow" ) { print $2 }}')
|
|
current_uid=$(/usr/bin/id -u "$current_user")
|
|
|
|
answer=$(
|
|
/bin/launchctl asuser "$current_uid" /usr/bin/osascript <<-END
|
|
set nameentry to button returned of (display dialog "Möchtest du mit der macOS installation Fortfahren" buttons {"cancel", "confirmation"} default button "cancel" with icon 2)
|
|
END
|
|
)
|
|
|
|
if [[ "$answer" == "confirmation" ]]
|
|
then
|
|
echo "weiter"
|
|
else
|
|
echo "Cancel"
|
|
fi |