git-sync

Tool for periodic syncing of git repositories
git clone https://git.sinitax.com/sinitax/git-sync
Log | Files | Refs | sfeed.txt

commit c1a56185a17ecc8b88ea163e45f47ce9f3bb09f3
parent 2e110a3885f1f197e3f918c41652a5df18a7976d
Author: Louis Burda <contact@sinitax.com>
Date:   Tue, 17 Jun 2025 10:55:20 +0200

Add timeout if repo is missing

Diffstat:
Mgit-syncd | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/git-syncd b/git-syncd @@ -32,6 +32,12 @@ watcher() { sync "$repo" timeout=$sync_timeout while true; do + if [ ! -e "$repo" ]; then + echo "Repo does not exist" + echo "sleeping (${timeout}s)" + sleep $timeout + continue + fi echo "watching (${timeout}s)" file=$(timeout "$timeout" wd "$repo" inotifywait "." -r \ -e modify,move,create,delete --exclude "$exclude" 2>/dev/null)