Add debug logs to download handler for production troubleshooting
This commit is contained in:
Executable
+135
@@ -0,0 +1,135 @@
|
||||
#!/bin/bash
|
||||
|
||||
# MarkBaseFS FSKit Finder 挂载脚本
|
||||
# Date: 2026-09-21
|
||||
# Purpose: 更新 Info.plist 并测试 Finder 挂载
|
||||
|
||||
set -e
|
||||
|
||||
echo "========================================"
|
||||
echo "MarkBaseFS FSKit Finder 挂载配置"
|
||||
echo "========================================"
|
||||
echo ""
|
||||
|
||||
TARGET_PLIST="/Library/Filesystems/markbasefs.fs/Contents/Info.plist"
|
||||
BACKUP="/tmp/Info.plist.backup"
|
||||
|
||||
echo "Phase 1: 备份当前配置"
|
||||
echo "----------------------------------------"
|
||||
sudo cp "$TARGET_PLIST" "$BACKUP"
|
||||
echo "✅ 备份完成: $BACKUP"
|
||||
echo ""
|
||||
|
||||
echo "Phase 2: 创建完整 Info.plist"
|
||||
echo "----------------------------------------"
|
||||
|
||||
# 创建新的 Info.plist
|
||||
sudo tee "$TARGET_PLIST" > /dev/null << 'EOF'
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.accusys.markbasefs</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>MarkBaseFS</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0.0</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>BNDL</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>markbasefs</string>
|
||||
|
||||
<key>FSKitSupportedSchemes</key>
|
||||
<array>
|
||||
<string>markbasefs</string>
|
||||
</array>
|
||||
|
||||
<key>FSKitShortName</key>
|
||||
<string>markbasefs</string>
|
||||
|
||||
<key>FSKitPersonalities</key>
|
||||
<dict>
|
||||
<key>MarkBaseFS</key>
|
||||
<dict>
|
||||
<key>FSKitMountOptions</key>
|
||||
<array>
|
||||
<string>user</string>
|
||||
<string>db</string>
|
||||
<string>path</string>
|
||||
</array>
|
||||
<key>FSKitDisplayName</key>
|
||||
<string>MarkBase File System</string>
|
||||
<key>FSKitDescription</key>
|
||||
<string>MarkBase virtual file system with VFS backend</string>
|
||||
</dict>
|
||||
</dict>
|
||||
|
||||
<key>FSKitMediaTypes</key>
|
||||
<dict>
|
||||
<key>com.accusys.markbasefs.volume</key>
|
||||
<dict>
|
||||
<key>LSHandlerRank</key>
|
||||
<string>Owner</string>
|
||||
</dict>
|
||||
</dict>
|
||||
|
||||
<key>CFBundleURLTypes</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CFBundleURLName</key>
|
||||
<string>com.accusys.markbasefs.url</string>
|
||||
<key>CFBundleURLSchemes</key>
|
||||
<array>
|
||||
<string>markbasefs</string>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>15.4</string>
|
||||
</dict>
|
||||
</plist>
|
||||
EOF
|
||||
|
||||
echo "✅ Info.plist 已更新"
|
||||
echo ""
|
||||
|
||||
echo "Phase 3: 验证配置"
|
||||
echo "----------------------------------------"
|
||||
|
||||
if grep -q "FSKitPersonalities" "$TARGET_PLIST"; then
|
||||
echo "✅ FSKitPersonalities 已添加"
|
||||
fi
|
||||
|
||||
if grep -q "FSKitMountOptions" "$TARGET_PLIST"; then
|
||||
echo "✅ FSKitMountOptions 已添加"
|
||||
fi
|
||||
|
||||
if grep -q "markbasefs" "$TARGET_PLIST"; then
|
||||
echo "✅ URL scheme 已配置"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
|
||||
echo "Phase 4: 显示完整配置"
|
||||
echo "----------------------------------------"
|
||||
cat "$TARGET_PLIST"
|
||||
echo ""
|
||||
|
||||
echo "========================================"
|
||||
echo "✅ 配置更新完成"
|
||||
echo "========================================"
|
||||
echo ""
|
||||
|
||||
echo "下一步:"
|
||||
echo " 1. 重启 FSKit 服务(需要重启系统或重新登录)"
|
||||
echo " 2. 打开 Finder"
|
||||
echo " 3. 选择 Go → Connect to Server..."
|
||||
echo " 4. 输入 URL:"
|
||||
echo " markbasefs://localhost?user=accusys&db=/tmp/markbase_volume_test/markbase.sqlite"
|
||||
echo ""
|
||||
echo "或者直接运行:"
|
||||
echo " open 'markbasefs://localhost?user=accusys&db=/tmp/markbase_volume_test/markbase.sqlite'"
|
||||
Reference in New Issue
Block a user