Rationalize file paths & adopting to macFUSE 4

This is based on Dave Griffin’s fixes, but changing the tool’s name from “afpfs-ng-OSX” to “afpfs-ng-mac”. This is to keep the differentiation from the original afpfs-ng, mainly because I changed its command to “mount_afp2”. But to also reflect Apple’s move from “OS X” to “macOS” and “FUSE for macOS” to “macFUSE” seven weeks ago.

Also, I keep the folder with “Mount AFP2.x volume.scpt” and “Unmount ALL AFP2.x volumes.scpt” in /Library/Scripts/ so they are also available from the Script Menu when logged in as a different user.

Fixes to meet the amended file locations of macFUSE v.4.x.
This commit is contained in:
mabam 2020-12-19 20:43:56 +01:00
parent 5eda2b2197
commit 88b6bb8eed
26 changed files with 32 additions and 30 deletions

Binary file not shown.

View File

@ -1,22 +0,0 @@
#!/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

View File

@ -1,4 +0,0 @@
{\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf400
{\fonttbl}
{\colortbl;\red255\green255\blue255;}
}

View File

@ -0,0 +1,22 @@
#!/bin/bash
# only run commands if mount variables file is not empty (contains variables)
if [ -s /usr/local/afpfs-ng-mac/bin/AFP2_mount_vars ]; then \
source /usr/local/afpfs-ng-mac/bin/AFP2_mount_vars
mount_afp2 afp://"$afpServerIP"/"$afpVolumeName" /usr/local/afpfs-ng-mac/mount/"$afpMountName"
osascript -e 'tell application "Finder"
make new alias to POSIX file "/usr/local/afpfs-ng-mac/mount/'"$afpMountName"'" at POSIX file "/usr/local/afpfs-ng-mac/link/AFP2 Mounts"
set name of result to "'"$afpMountName"'"
end tell'
# clear content of mount variables file
> /usr/local/afpfs-ng-mac/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-mac.volume_select.app" | awk '!/grep/' | cut -c 1-5)
fi

View File

@ -11,13 +11,15 @@
<key>CFBundleIconFile</key>
<string>applet</string>
<key>CFBundleIdentifier</key>
<string>com.apple.ScriptEditor.id.afpfs-ng-OSX-volume-select</string>
<string>com.apple.ScriptEditor.id.afpfs-ng-mac-volume-select</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>afpfs-ng-OSX.volume_select</string>
<string>afpfs-ng-mac.volume_select</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>aplt</string>
<key>LSMinimumSystemVersionByArchitecture</key>
@ -36,9 +38,9 @@
<key>name</key>
<string>ScriptWindowState</string>
<key>positionOfDivider</key>
<real>518</real>
<real>346</real>
<key>savedFrame</key>
<string>170 116 602 886 0 0 1280 1002 </string>
<string>3 129 606 617 0 0 1024 746 </string>
<key>selectedTabView</key>
<string>result</string>
</dict>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 362 B

After

Width:  |  Height:  |  Size: 362 B

View File

@ -0,0 +1,4 @@
{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf210
{\fonttbl}
{\colortbl;\red255\green255\blue255;}
}