Files
weval-l99/tools/git-sync.sh
2026-04-15 01:38:46 +02:00

14 lines
372 B
Bash
Executable File

#!/bin/bash
cd /var/www/html
git config --global safe.directory /var/www/html 2>/dev/null
git add -A
DIRTY=0
if [ -gt 0 ]; then
git commit -m "auto-sync-20260413-1309" 2>/dev/null | tail -1
timeout 15 git push origin main 2>/dev/null | tail -1
timeout 15 git push gitea main 2>/dev/null | tail -1
echo "Pushed files"
else
echo "Git clean — 0 dirty files"
fi