diff --git a/autosync.sh b/autosync.sh new file mode 100755 index 0000000..b6852f1 --- /dev/null +++ b/autosync.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +cd /workspace/homelab || exit 1 + +while true; do + if ! git diff --quiet || ! git diff --cached --quiet || [ -n "$(git ls-files --others --exclude-standard)" ]; then + git add . + git commit -m "Auto-sync: $(date '+%Y-%m-%d %H:%M:%S')" || true + git push + fi + sleep 300 +done