rootfs/opt/git-sync/git-sync.sh hinzugefügt

This commit is contained in:
2025-11-29 19:23:44 +01:00
parent 159386cf0e
commit 380ba791b5

View File

@@ -0,0 +1,19 @@
#!/bin/bash
REPO="/opt/git-sync/"
TARGET="/"
# sicherstellen dass Repo existiert
if [ ! -d "$REPO/.git" ]; then
echo "Git-Repo nicht gefunden: $REPO"
exit 1
fi
# Aktualisieren
cd "$REPO" || exit 1
git pull --rebase
# Dateien verteilen (rootfs → /)
sudo rsync -a rootfs/ "$TARGET"
exit 0