+function error() {
+ echo "XScreenSaver Installer: Error: $@" >&2
+ (
+ # Using "System Events" says "No user interaction allowed" on 10.9.
+ # But using "Automator Runner" still seems to work.
+ osascript <<__EOF__
+ tell app "Automator Runner" to \
+ display dialog "$@" \
+ buttons "Bummer" \
+ default button 1 \
+ with icon 0 \
+ with title "Installation Error"
+__EOF__
+ ) </dev/null >/dev/null 2>&1 &
+ exit 1
+}