refactor: unison-Migration vorbereiten — rsync-Abstraktion in darktable_common

- Zentralisiere alle rsync-Aufrufe in darktable_common.sh mit perform_rsync()
- Trockenlauf-Flag-Handling in Gemeinsam-Funktionen
- perform_rsync() gibt Zeilenanzahl zurück für Trockenlauf-Zählwerte
- darktable_sync.sh nutzt nur noch perform_rsync(), reduziert Duplikation
- Testabdeckung für perform_rsync() + rsync-Fehlerbehandlung erweitert
- CLAUDE.md mit unison-Migration-Absicht dokumentiert

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-21 20:49:11 +02:00
parent 6b47b8941c
commit 6074f101ff
7 changed files with 227 additions and 195 deletions
+8 -2
View File
@@ -88,11 +88,17 @@ echo ""
echo "Abhaengigkeiten pruefen..."
REQUIRED_CMDS=("rsync" "notify-send" "darktable" "systemctl" "ssh")
REQUIRED_CMDS=("unison" "notify-send" "darktable" "systemctl" "ssh")
for cmd in "${REQUIRED_CMDS[@]}"; do
if ! command -v "$cmd" >/dev/null 2>&1; then
echo "Fehler: '$cmd' ist nicht installiert."
echo " Installieren mit: sudo apt install $cmd"
if [ "$cmd" = "unison" ]; then
echo " Installieren mit: sudo apt install unison"
echo " WICHTIG: Unison muss auch auf dem Server installiert sein (gleiche Version):"
echo " ssh $SERVER_USER@$SERVER_IP sudo apt install unison"
else
echo " Installieren mit: sudo apt install $cmd"
fi
exit 1
fi
done