set alertMessage to \"An error occurred during Ryujinx update (updater.sh:$lineno)\n\nPlease download the update manually from our website if the problem persists.\"
display dialog alertMessage with icon caution with title alertTitle buttons {\"Open Download Page\", \"Exit\"}
set the button_pressed to the button returned of the result
if the button_pressed is \"Open Download Page\"then
open location \"https://ryujinx.org/download\"
end if
"""
osascript -e "$script"
exit1
}
# Wait for Ryujinx to exit
# NOTE: in case no fds are open, lsof could be returning with a process still living.
# We wait 1s and assume the process stopped after that