diff options
| author | Louis Burda <contact@sinitax.com> | 2025-04-23 21:14:52 +0200 |
|---|---|---|
| committer | Louis Burda <contact@sinitax.com> | 2025-04-23 21:14:52 +0200 |
| commit | 42f34eef8d5d7026bfa143f217d2c0924e8d5c30 (patch) | |
| tree | 35ff9f97f2f639855e81dad78ec2b5f65efc3a1d | |
| parent | a9cdf326c3361e1a50efff2b9b7a990fa239e77b (diff) | |
| download | git-sync-42f34eef8d5d7026bfa143f217d2c0924e8d5c30.tar.gz git-sync-42f34eef8d5d7026bfa143f217d2c0924e8d5c30.zip | |
Enforce timeout with timeout command
| -rwxr-xr-x | git-syncd | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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 |
