diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e7aa30f --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +$ cat .gitignore +.DS_Store \ No newline at end of file diff --git a/Library/Scripts/afpfs-ng-OSX/Mount AFP2.x volume.scpt b/Library/Scripts/afpfs-ng-OSX/Mount AFP2.x volume.scpt new file mode 100755 index 0000000..a687d6e Binary files /dev/null and b/Library/Scripts/afpfs-ng-OSX/Mount AFP2.x volume.scpt differ diff --git a/Library/Scripts/afpfs-ng-OSX/Unmount ALL AFP2.x volumes.scpt b/Library/Scripts/afpfs-ng-OSX/Unmount ALL AFP2.x volumes.scpt new file mode 100755 index 0000000..e7845c1 Binary files /dev/null and b/Library/Scripts/afpfs-ng-OSX/Unmount ALL AFP2.x volumes.scpt differ diff --git a/README.md b/README.md new file mode 100644 index 0000000..fd4ca52 --- /dev/null +++ b/README.md @@ -0,0 +1,9 @@ +## afpfs-ng-OSX GUI + +This repository contains the GUI related files included in the .pkg installer at https://github.com/mabam/afpfs-ng-OSX/releases . + +"Library" and "etc" contain GUI related files and folders at the locations the afpfs-ng-OSX .pkg installer writes them to the boot partition. + +"source" contains the uncompiled scripts of two of those files (I used Platypus for compiling afpfs-ng-OSX.mount_cmd.command). + +"source/post-installation script" contains the post-install script built into the .pkg installer. \ No newline at end of file diff --git a/etc/afpfs-ng-OSX/bin/AFP2_mount_vars b/etc/afpfs-ng-OSX/bin/AFP2_mount_vars new file mode 100644 index 0000000..e69de29 diff --git a/etc/afpfs-ng-OSX/bin/afpfs-ng-OSX.mount_cmd.app/Contents/Info.plist b/etc/afpfs-ng-OSX/bin/afpfs-ng-OSX.mount_cmd.app/Contents/Info.plist new file mode 100755 index 0000000..824b037 Binary files /dev/null and b/etc/afpfs-ng-OSX/bin/afpfs-ng-OSX.mount_cmd.app/Contents/Info.plist differ diff --git a/etc/afpfs-ng-OSX/bin/afpfs-ng-OSX.mount_cmd.app/Contents/MacOS/afpfs-ng-OSX.mount_cmd b/etc/afpfs-ng-OSX/bin/afpfs-ng-OSX.mount_cmd.app/Contents/MacOS/afpfs-ng-OSX.mount_cmd new file mode 100755 index 0000000..9aface8 Binary files /dev/null and b/etc/afpfs-ng-OSX/bin/afpfs-ng-OSX.mount_cmd.app/Contents/MacOS/afpfs-ng-OSX.mount_cmd differ diff --git a/etc/afpfs-ng-OSX/bin/afpfs-ng-OSX.mount_cmd.app/Contents/Resources/AppSettings.plist b/etc/afpfs-ng-OSX/bin/afpfs-ng-OSX.mount_cmd.app/Contents/Resources/AppSettings.plist new file mode 100755 index 0000000..cb4ed89 Binary files /dev/null and b/etc/afpfs-ng-OSX/bin/afpfs-ng-OSX.mount_cmd.app/Contents/Resources/AppSettings.plist differ diff --git a/etc/afpfs-ng-OSX/bin/afpfs-ng-OSX.mount_cmd.app/Contents/Resources/MainMenu.nib b/etc/afpfs-ng-OSX/bin/afpfs-ng-OSX.mount_cmd.app/Contents/Resources/MainMenu.nib new file mode 100755 index 0000000..6ee4493 Binary files /dev/null and b/etc/afpfs-ng-OSX/bin/afpfs-ng-OSX.mount_cmd.app/Contents/Resources/MainMenu.nib differ diff --git a/etc/afpfs-ng-OSX/bin/afpfs-ng-OSX.mount_cmd.app/Contents/Resources/appIcon.icns b/etc/afpfs-ng-OSX/bin/afpfs-ng-OSX.mount_cmd.app/Contents/Resources/appIcon.icns new file mode 100755 index 0000000..14fcbcc Binary files /dev/null and b/etc/afpfs-ng-OSX/bin/afpfs-ng-OSX.mount_cmd.app/Contents/Resources/appIcon.icns differ diff --git a/etc/afpfs-ng-OSX/bin/afpfs-ng-OSX.mount_cmd.app/Contents/Resources/script b/etc/afpfs-ng-OSX/bin/afpfs-ng-OSX.mount_cmd.app/Contents/Resources/script new file mode 100755 index 0000000..9144e05 --- /dev/null +++ b/etc/afpfs-ng-OSX/bin/afpfs-ng-OSX.mount_cmd.app/Contents/Resources/script @@ -0,0 +1,22 @@ +#!/bin/bash + +# only run commands if mount variables file is not empty (contains variables) +if [ -s /etc/afpfs-ng-OSX/bin/AFP2_mount_vars ]; then \ + +source /etc/afpfs-ng-OSX/bin/AFP2_mount_vars +mount_afp2 afp://"$afpServerIP"/"$afpVolumeName" /etc/afpfs-ng-OSX/mount/"$afpMountName" + +osascript -e 'tell application "Finder" +make new alias to POSIX file "/etc/afpfs-ng-OSX/mount/'"$afpMountName"'" at POSIX file "/etc/afpfs-ng-OSX/link/AFP2 Mounts" +set name of result to "'"$afpMountName"'" +end tell' + +# clear content of mount variables file +> /etc/afpfs-ng-OSX/bin/AFP2_mount_vars + +sleep 2 + +# force quit volume selection app (required when first ran after system boot, probably due to bug in AppleScript) +kill $(ps -ax | grep "afpfs-ng-OSX.volume_select.app" | awk '!/grep/' | cut -c 1-5) + +fi \ No newline at end of file diff --git a/etc/afpfs-ng-OSX/bin/afpfs-ng-OSX.volume_select.app/Contents/Info.plist b/etc/afpfs-ng-OSX/bin/afpfs-ng-OSX.volume_select.app/Contents/Info.plist new file mode 100755 index 0000000..f751b76 --- /dev/null +++ b/etc/afpfs-ng-OSX/bin/afpfs-ng-OSX.volume_select.app/Contents/Info.plist @@ -0,0 +1,46 @@ + + + + + CFBundleAllowMixedLocalizations + + CFBundleDevelopmentRegion + English + CFBundleExecutable + applet + CFBundleIconFile + applet + CFBundleIdentifier + com.apple.ScriptEditor.id.afpfs-ng-OSX-volume-select + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + afpfs-ng-OSX.volume_select + CFBundlePackageType + APPL + CFBundleSignature + aplt + LSMinimumSystemVersionByArchitecture + + x86_64 + 10.6 + + LSRequiresCarbon + + WindowState + + dividerCollapsed + + eventLogLevel + -1 + name + ScriptWindowState + positionOfDivider + 518 + savedFrame + 170 116 602 886 0 0 1280 1002 + selectedTabView + result + + + diff --git a/etc/afpfs-ng-OSX/bin/afpfs-ng-OSX.volume_select.app/Contents/MacOS/applet b/etc/afpfs-ng-OSX/bin/afpfs-ng-OSX.volume_select.app/Contents/MacOS/applet new file mode 100755 index 0000000..c7c272b Binary files /dev/null and b/etc/afpfs-ng-OSX/bin/afpfs-ng-OSX.volume_select.app/Contents/MacOS/applet differ diff --git a/etc/afpfs-ng-OSX/bin/afpfs-ng-OSX.volume_select.app/Contents/PkgInfo b/etc/afpfs-ng-OSX/bin/afpfs-ng-OSX.volume_select.app/Contents/PkgInfo new file mode 100755 index 0000000..3253614 --- /dev/null +++ b/etc/afpfs-ng-OSX/bin/afpfs-ng-OSX.volume_select.app/Contents/PkgInfo @@ -0,0 +1 @@ +APPLaplt \ No newline at end of file diff --git a/etc/afpfs-ng-OSX/bin/afpfs-ng-OSX.volume_select.app/Contents/Resources/Scripts/main.scpt b/etc/afpfs-ng-OSX/bin/afpfs-ng-OSX.volume_select.app/Contents/Resources/Scripts/main.scpt new file mode 100755 index 0000000..5e36c0d Binary files /dev/null and b/etc/afpfs-ng-OSX/bin/afpfs-ng-OSX.volume_select.app/Contents/Resources/Scripts/main.scpt differ diff --git a/etc/afpfs-ng-OSX/bin/afpfs-ng-OSX.volume_select.app/Contents/Resources/applet.icns b/etc/afpfs-ng-OSX/bin/afpfs-ng-OSX.volume_select.app/Contents/Resources/applet.icns new file mode 100755 index 0000000..0cdd170 Binary files /dev/null and b/etc/afpfs-ng-OSX/bin/afpfs-ng-OSX.volume_select.app/Contents/Resources/applet.icns differ diff --git a/etc/afpfs-ng-OSX/bin/afpfs-ng-OSX.volume_select.app/Contents/Resources/applet.rsrc b/etc/afpfs-ng-OSX/bin/afpfs-ng-OSX.volume_select.app/Contents/Resources/applet.rsrc new file mode 100755 index 0000000..3b39a08 Binary files /dev/null and b/etc/afpfs-ng-OSX/bin/afpfs-ng-OSX.volume_select.app/Contents/Resources/applet.rsrc differ diff --git a/etc/afpfs-ng-OSX/bin/afpfs-ng-OSX.volume_select.app/Contents/Resources/description.rtfd/TXT.rtf b/etc/afpfs-ng-OSX/bin/afpfs-ng-OSX.volume_select.app/Contents/Resources/description.rtfd/TXT.rtf new file mode 100755 index 0000000..6424c26 --- /dev/null +++ b/etc/afpfs-ng-OSX/bin/afpfs-ng-OSX.volume_select.app/Contents/Resources/description.rtfd/TXT.rtf @@ -0,0 +1,4 @@ +{\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf400 +{\fonttbl} +{\colortbl;\red255\green255\blue255;} +} \ No newline at end of file diff --git a/etc/afpfs-ng-OSX/icon/logged_on_folder.icns b/etc/afpfs-ng-OSX/icon/logged_on_folder.icns new file mode 100755 index 0000000..bc93955 Binary files /dev/null and b/etc/afpfs-ng-OSX/icon/logged_on_folder.icns differ diff --git a/etc/afpfs-ng-OSX/icon/server.icns b/etc/afpfs-ng-OSX/icon/server.icns new file mode 100755 index 0000000..4b25192 Binary files /dev/null and b/etc/afpfs-ng-OSX/icon/server.icns differ diff --git a/etc/afpfs-ng-OSX/icon/shared_folder.icns b/etc/afpfs-ng-OSX/icon/shared_folder.icns new file mode 100755 index 0000000..2ca889c Binary files /dev/null and b/etc/afpfs-ng-OSX/icon/shared_folder.icns differ diff --git a/etc/afpfs-ng-OSX/icon/shared_volume.icns b/etc/afpfs-ng-OSX/icon/shared_volume.icns new file mode 100755 index 0000000..a46e9c7 Binary files /dev/null and b/etc/afpfs-ng-OSX/icon/shared_volume.icns differ diff --git a/etc/afpfs-ng-OSX/link/AFP2 Mounts/make_dir b/etc/afpfs-ng-OSX/link/AFP2 Mounts/make_dir new file mode 100644 index 0000000..e69de29 diff --git a/etc/afpfs-ng-OSX/mount/make_dir b/etc/afpfs-ng-OSX/mount/make_dir new file mode 100644 index 0000000..e69de29 diff --git a/source/afpfs-ng-OSX.mount_cmd.command b/source/afpfs-ng-OSX.mount_cmd.command new file mode 100755 index 0000000..9144e05 --- /dev/null +++ b/source/afpfs-ng-OSX.mount_cmd.command @@ -0,0 +1,22 @@ +#!/bin/bash + +# only run commands if mount variables file is not empty (contains variables) +if [ -s /etc/afpfs-ng-OSX/bin/AFP2_mount_vars ]; then \ + +source /etc/afpfs-ng-OSX/bin/AFP2_mount_vars +mount_afp2 afp://"$afpServerIP"/"$afpVolumeName" /etc/afpfs-ng-OSX/mount/"$afpMountName" + +osascript -e 'tell application "Finder" +make new alias to POSIX file "/etc/afpfs-ng-OSX/mount/'"$afpMountName"'" at POSIX file "/etc/afpfs-ng-OSX/link/AFP2 Mounts" +set name of result to "'"$afpMountName"'" +end tell' + +# clear content of mount variables file +> /etc/afpfs-ng-OSX/bin/AFP2_mount_vars + +sleep 2 + +# force quit volume selection app (required when first ran after system boot, probably due to bug in AppleScript) +kill $(ps -ax | grep "afpfs-ng-OSX.volume_select.app" | awk '!/grep/' | cut -c 1-5) + +fi \ No newline at end of file diff --git a/source/afpfs-ng-OSX.volume_select.scpt b/source/afpfs-ng-OSX.volume_select.scpt new file mode 100755 index 0000000..2708e66 Binary files /dev/null and b/source/afpfs-ng-OSX.volume_select.scpt differ diff --git a/source/post-installation script/afpfs-ng-OSX.post_install.command b/source/post-installation script/afpfs-ng-OSX.post_install.command new file mode 100755 index 0000000..e4a26d1 --- /dev/null +++ b/source/post-installation script/afpfs-ng-OSX.post_install.command @@ -0,0 +1,66 @@ +#!/bin/bash + +# check if AppleScript menu active +if grep -q 'Script Menu.menu' ~/Library/Preferences/com.apple.systemuiserver.plist + +# if AppleScript menu already active, point to it for controlling afpfs-ng-OSX +then osascript -e 'tell application (path to frontmost application as text) to display dialog "Find “afpfs-ng-OSX” in the AppleScript menu to the right of your menu bar." & return & return & "There you can mount and unmount volumes." & return & return & "After first run, any mounted volumes will be available through “AFP2 Mounts” in the side bar of each Finder window." with title "afpfs-ng-OSX" buttons {"OK"} default button "OK" with icon "/etc/afpfs-ng-OSX/icon/logged_on_folder.icns" as POSIX file' + +# if AppleScript menu not active, add it to SystemUIServer preferences and save as temp file +else plutil -convert xml1 ~/Library/Preferences/com.apple.systemuiserver.plist -o - | awk '//{print;print "\t\t/System/Library/CoreServices/Menu Extras/Script Menu.menu";next}1' | plutil -convert binary1 - -o - > /etc/afpfs-ng-OSX/ScriptMenu.tmp + +# check temp file to verify conversion went fine +if grep -q 'Script Menu.menu' /etc/afpfs-ng-OSX/ScriptMenu.tmp + +# if conversion successful, backup SystemUIServer prefs, overwrite with temp file and restart SystemUIServer +then mv ~/Library/Preferences/com.apple.systemuiserver.plist ~/Library/Preferences/com.apple.systemuiserver.plist.old; cp /etc/afpfs-ng-OSX/ScriptMenu.tmp ~/Library/Preferences/com.apple.systemuiserver.plist && $(sleep 1; killall SystemUIServer; open /System/Library/CoreServices/Menu\ Extras/Script\ Menu.menu); rm /etc/afpfs-ng-OSX/ScriptMenu.tmp + +# check if prefs are still intact after restarting SystemUIServer +if grep -q 'Script Menu.menu' ~/Library/Preferences/com.apple.systemuiserver.plist + +# if prefs are intact, point user to AppleScript menu +then osascript -e 'tell application (path to frontmost application as text) to display dialog "The AppleScript menu to the right of your menu bar has been activated." & return & return & "There you can find “afpfs-ng-OSX” to mount and unmount volumes." & return & return & "After first run, any mounted volumes will be available through “AFP2 Mounts” in the side bar of each Finder window." with title "afpfs-ng-OSX" buttons {"OK"} default button "OK" with icon "/etc/afpfs-ng-OSX/icon/logged_on_folder.icns" as POSIX file' + +# if prefs are not intact, offer to manually activate AppleScript menu or to retry automatically +else rm ~/Library/Preferences/com.apple.systemuiserver.plist; mv ~/Library/Preferences/com.apple.systemuiserver.plist.old ~/Library/Preferences/com.apple.systemuiserver.plist; rm ~/Library/Preferences/com.apple.systemuiserver.plist.old; killall SystemUIServer; open /System/Library/CoreServices/SystemUIServer.app; osascript -e 'tell application "System Events"' -e 'if (name of processes) contains "Installer" then' -e 'tell application "Installer" to activate' -e 'end if' -e 'end tell' -e 'tell application (path to frontmost application as text) to display alert "Could not complete post-installation automatically" message "In order to mount and unmount volumes using afpfs-ng-OSX, the AppleScript menu has to be activated. It will then appear to the right of your menu bar." & return & return & "To activate it manually:" & return & "• Click on “Open Script Editor.app”," & return & "• select “Script Editor” –> “Preferences …” from the menu," & return & "• tick “Show Script menu in menu bar”." & return & return & "Alternatively you may retry automatic completion." & return & return & "Do you want to open Script Editor now?" buttons {"Open Script Editor.app", "Retry automatically"} default button "Open Script Editor.app" cancel button "Retry automatically"' -e 'tell application "AppleScript Editor" to activate' || $(plutil -convert xml1 ~/Library/Preferences/com.apple.systemuiserver.plist -o - | awk '//{print;print "\t\t/System/Library/CoreServices/Menu Extras/Script Menu.menu";next}1' | plutil -convert binary1 - -o - > /etc/afpfs-ng-OSX/ScriptMenu.tmp + +# REPEAT ORIGINAL STEPS IF USER OPTED FOR AUTO RETRY - if failes again only offer manual activation +if grep -q 'Script Menu.menu' /etc/afpfs-ng-OSX/ScriptMenu.tmp + +then mv ~/Library/Preferences/com.apple.systemuiserver.plist ~/Library/Preferences/com.apple.systemuiserver.plist.old; cp /etc/afpfs-ng-OSX/ScriptMenu.tmp ~/Library/Preferences/com.apple.systemuiserver.plist && $(sleep 1; killall SystemUIServer; open /System/Library/CoreServices/Menu\ Extras/Script\ Menu.menu); rm /etc/afpfs-ng-OSX/ScriptMenu.tmp + +if grep -q 'Script Menu.menu' ~/Library/Preferences/com.apple.systemuiserver.plist + +then osascript -e 'tell application (path to frontmost application as text) to display dialog "The AppleScript menu to the right of your menu bar has been activated." & return & return & "There you can find “afpfs-ng-OSX” to mount and unmount volumes." & return & return & "After first run, any mounted volumes will be available through “AFP2 Mounts” in the side bar of each Finder window." with title "afpfs-ng-OSX" buttons {"OK"} default button "OK" with icon "/etc/afpfs-ng-OSX/icon/logged_on_folder.icns" as POSIX file' + +else rm ~/Library/Preferences/com.apple.systemuiserver.plist; mv ~/Library/Preferences/com.apple.systemuiserver.plist.old ~/Library/Preferences/com.apple.systemuiserver.plist; rm ~/Library/Preferences/com.apple.systemuiserver.plist.old; killall SystemUIServer; open /System/Library/CoreServices/SystemUIServer.app; osascript -e 'tell application "System Events"' -e 'if (name of processes) contains "Installer" then' -e 'tell application "Installer" to activate' -e 'end if' -e 'end tell' -e 'tell application (path to frontmost application as text) to display alert "Could not complete post-installation automatically" message "In order to mount and unmount volumes using afpfs-ng-OSX, you must activate the AppleScript menu manually. It will then appear to the right of your menu bar." & return & return & "Follow these steps:" & return & "• Click on “Open Script Editor.app”," & return & "• select “Script Editor” –> “Preferences …” from the menu," & return & "• tick “Show Script menu in menu bar”." buttons {"Open Script Editor.app"} default button "Open Script Editor.app"' -e 'tell application "AppleScript Editor" to activate' +fi + +else rm /etc/afpfs-ng-OSX/ScriptMenu.tmp; osascript -e 'tell application "System Events"' -e 'if (name of processes) contains "Installer" then' -e 'tell application "Installer" to activate' -e 'end if' -e 'end tell' -e 'tell application (path to frontmost application as text) to display alert "Could not complete post-installation automatically" message "In order to mount and unmount volumes using afpfs-ng-OSX, you must activate the AppleScript menu manually. It will then appear to the right of your menu bar." & return & return & "Follow these steps:" & return & "• Click on “Open Script Editor.app”," & return & "• select “Script Editor” –> “Preferences …” from the menu," & return & "• tick “Show Script menu in menu bar”." buttons {"Open Script Editor.app"} default button "Open Script Editor.app"' -e 'tell application "AppleScript Editor" to activate' +fi) +# END REPEAT ORIGINAL STEPS IF USER OPTED FOR AUTO RETRY + +fi + +# if temp file is not intact, offer to manually activate AppleScript menu or to retry automatically +else rm /etc/afpfs-ng-OSX/ScriptMenu.tmp; osascript -e 'tell application "System Events"' -e 'if (name of processes) contains "Installer" then' -e 'tell application "Installer" to activate' -e 'end if' -e 'end tell' -e 'tell application (path to frontmost application as text) to display alert "Could not complete post-installation automatically" message "In order to mount and unmount volumes using afpfs-ng-OSX, the AppleScript menu has to be activated. It will then appear to the right of your menu bar." & return & return & "To activate it manually:" & return & "• Click on “Open Script Editor.app”," & return & "• select “Script Editor” –> “Preferences …” from the menu," & return & "• tick “Show Script menu in menu bar”." & return & return & "Alternatively you may retry automatic completion." & return & return & "Do you want to open Script Editor now?" buttons {"Open Script Editor.app", "Retry automatically"} default button "Open Script Editor.app" cancel button "Retry automatically"' -e 'tell application "AppleScript Editor" to activate' || $(plutil -convert xml1 ~/Library/Preferences/com.apple.systemuiserver.plist -o - | awk '//{print;print "\t\t/System/Library/CoreServices/Menu Extras/Script Menu.menu";next}1' | plutil -convert binary1 - -o - > /etc/afpfs-ng-OSX/ScriptMenu.tmp + +# REPEAT ORIGINAL STEPS IF USER OPTED FOR AUTO RETRY - if failes again only offer manual activation +if grep -q 'Script Menu.menu' /etc/afpfs-ng-OSX/ScriptMenu.tmp + +then mv ~/Library/Preferences/com.apple.systemuiserver.plist ~/Library/Preferences/com.apple.systemuiserver.plist.old; cp /etc/afpfs-ng-OSX/ScriptMenu.tmp ~/Library/Preferences/com.apple.systemuiserver.plist && $(sleep 1; killall SystemUIServer; open /System/Library/CoreServices/Menu\ Extras/Script\ Menu.menu); rm /etc/afpfs-ng-OSX/ScriptMenu.tmp + +if grep -q 'Script Menu.menu' ~/Library/Preferences/com.apple.systemuiserver.plist + +then osascript -e 'tell application (path to frontmost application as text) to display dialog "The AppleScript menu to the right of your menu bar has been activated." & return & return & "There you can find “afpfs-ng-OSX” to mount and unmount volumes." & return & return & "After first run, any mounted volumes will be available through “AFP2 Mounts” in the side bar of each Finder window." with title "afpfs-ng-OSX" buttons {"OK"} default button "OK" with icon "/etc/afpfs-ng-OSX/icon/logged_on_folder.icns" as POSIX file' + +else rm ~/Library/Preferences/com.apple.systemuiserver.plist; mv ~/Library/Preferences/com.apple.systemuiserver.plist.old ~/Library/Preferences/com.apple.systemuiserver.plist; rm ~/Library/Preferences/com.apple.systemuiserver.plist.old; killall SystemUIServer; open /System/Library/CoreServices/SystemUIServer.app; osascript -e 'tell application "System Events"' -e 'if (name of processes) contains "Installer" then' -e 'tell application "Installer" to activate' -e 'end if' -e 'end tell' -e 'tell application (path to frontmost application as text) to display alert "Could not complete post-installation automatically" message "In order to mount and unmount volumes using afpfs-ng-OSX, you must activate the AppleScript menu manually. It will then appear to the right of your menu bar." & return & return & "Follow these steps:" & return & "• Click on “Open Script Editor.app”," & return & "• select “Script Editor” –> “Preferences …” from the menu," & return & "• tick “Show Script menu in menu bar”." buttons {"Open Script Editor.app"} default button "Open Script Editor.app"' -e 'tell application "AppleScript Editor" to activate' +fi + +else rm /etc/afpfs-ng-OSX/ScriptMenu.tmp; osascript -e 'tell application "System Events"' -e 'if (name of processes) contains "Installer" then' -e 'tell application "Installer" to activate' -e 'end if' -e 'end tell' -e 'tell application (path to frontmost application as text) to display alert "Could not complete post-installation automatically" message "In order to mount and unmount volumes using afpfs-ng-OSX, you must activate the AppleScript menu manually. It will then appear to the right of your menu bar." & return & return & "Follow these steps:" & return & "• Click on “Open Script Editor.app”," & return & "• select “Script Editor” –> “Preferences …” from the menu," & return & "• tick “Show Script menu in menu bar”." buttons {"Open Script Editor.app"} default button "Open Script Editor.app"' -e 'tell application "AppleScript Editor" to activate' +fi) +# END REPEAT ORIGINAL STEPS IF USER OPTED FOR AUTO RETRY + +fi + +fi \ No newline at end of file