diff options
| author | Louis Burda <contact@sinitax.com> | 2025-06-17 10:55:20 +0200 |
|---|---|---|
| committer | Louis Burda <contact@sinitax.com> | 2025-06-17 10:55:20 +0200 |
| commit | c1a56185a17ecc8b88ea163e45f47ce9f3bb09f3 (patch) | |
| tree | e4397681e07cfa6beaf801b6ec877d582928f6dc | |
| parent | 2e110a3885f1f197e3f918c41652a5df18a7976d (diff) | |
| download | git-sync-c1a56185a17ecc8b88ea163e45f47ce9f3bb09f3.tar.gz git-sync-c1a56185a17ecc8b88ea163e45f47ce9f3bb09f3.zip | |
Add timeout if repo is missing
| -rwxr-xr-x | git-syncd | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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) |
