+ # Using "System Events" says "No user interaction allowed" on 10.9.
+ # But using "SystemUIServer" or "Automator Runner" still seems to work.
+ #
+ runner="System Events"
+ if [ -d "/System/Library/CoreServices/SystemUIServer.app" ]; then
+ runner="SystemUIServer"
+ elif [ -d "/System/Library/CoreServices/Automator Runner.app" ]; then
+ runner="Automator Runner"
+ fi
+
+ (
+ osascript <<__EOF__
+ tell app "$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
+}
+
+
+#if[ x"$DSTVOLUME" = x ]; then error "DSTVOLUME unset"; fi
+if [ x"$PACKAGE_PATH" = x ]; then error "PACKAGE_PATH unset"; fi
+if [ x"$HOME" = x ]; then error "HOME unset"; fi