Initial commit: combine nas_tool, nas_webdav, sync-utils

This commit is contained in:
Gan, Jimmy
2026-02-18 22:59:43 +08:00
commit 526c6a5521
77 changed files with 7898 additions and 0 deletions
+84
View File
@@ -0,0 +1,84 @@
#!/bin/bash
# Emergency Options - When Update Can't Download
set -e
echo "=== Emergency Options ==="
echo ""
echo "Update download failed: Need 17.64GB, have less."
echo "You're in a catch-22 situation."
echo ""
FREE_SPACE=$(df / | tail -1 | awk '{print $4}')
FREE_SPACE_GB=$(echo "scale=2; $FREE_SPACE / 1024 / 1024" | bc)
echo "Current free space: ${FREE_SPACE_GB}GB"
echo "Needed: 17.64GB"
echo "Shortfall: ~$(echo "17.64 - $FREE_SPACE_GB" | bc)GB"
echo ""
echo "🔧 OPTIONS:"
echo ""
echo "1. **Use External Drive** (BEST OPTION)"
echo ""
echo " If you have an external USB drive:"
echo " a) Connect it"
echo " b) Move large files there (not NAS - external drive):"
echo " - Downloads (8.7GB)"
echo " - .ollama (17GB)"
echo " - .local (18GB)"
echo " c) Install macOS update"
echo " d) After update clears snapshot, move files back"
echo ""
echo "2. **Contact Apple Support** (RECOMMENDED)"
echo ""
echo " Phone: 1-800-275-2273"
echo " Explain: 'OS update snapshot preventing space recovery'"
echo " They may:"
echo " - Have tools to force-clear snapshot"
echo " - Help with update process"
echo " - Provide other solutions"
echo ""
echo "3. **Try System Settings Update** (Sometimes works differently)"
echo ""
echo " System Settings → General → Software Update"
echo " Click 'Update Now'"
echo " Sometimes GUI works when command line doesn't"
echo ""
echo "4. **Check for External Storage**"
echo ""
echo " Do you have:"
echo " - USB drive?"
echo " - SD card?"
echo " - Another Mac you can network to?"
echo " - Cloud storage (iCloud, Dropbox, etc.)?"
echo ""
echo "5. **Last Resort: Clean Install** (Loses data, not recommended)"
echo ""
echo " ⚠️ Only if you have everything backed up"
echo " - Create bootable installer"
echo " - Fresh install macOS"
echo " - Restore from Time Machine"
echo ""
echo "=== What You CAN Do Right Now ==="
echo ""
echo "Even though space isn't freed, your files ARE safe on NAS."
echo ""
echo "The space WILL be freed after updating macOS."
echo ""
echo "The blocker is: You need space to update, but can't free space"
echo "because the snapshot preserves everything."
echo ""
echo "🎯 IMMEDIATE ACTION:"
echo ""
echo "1. Check if you have external drive"
echo "2. If yes: Use it to temporarily move files"
echo "3. If no: Contact Apple Support (1-800-275-2273)"
echo ""