git-sync

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

commit 42f34eef8d5d7026bfa143f217d2c0924e8d5c30
parent a9cdf326c3361e1a50efff2b9b7a990fa239e77b
Author: Louis Burda <contact@sinitax.com>
Date:   Wed, 23 Apr 2025 21:14:52 +0200

Enforce timeout with timeout command

Diffstat:
Mgit-syncd | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/git-syncd b/git-syncd @@ -27,8 +27,9 @@ watcher() { sync "$repo" timeout=$sync_timeout while true; do - file=$(inotifywait "$repo" -r -e modify,move,create,delete \ - --exclude '\.git' ${excludes[@]} -t "$timeout" 2>/dev/null) + file=$(timeout "$timeout" inotifywait "$repo" -r \ + -e modify,move,create,delete --exclude '\.git' \ + ${excludes[@]} 2>/dev/null) if [ ! -z "$file" ]; then echo "inotify wake: $file" timeout=$sync_delay