{ "name": "lsyncd", "version": "2.3.1", "summary": "lsyncd: watches a folder with inotify and mirrors its changes to another folder or host by rsync", "category": "tool", "license": "GPL-2.0-or-later", "homepage": "https://github.com/lsyncd/lsyncd", "source": { "url": "https://github.com/lsyncd/lsyncd/archive/refs/tags/v2.3.1.tar.gz", "sha256": "501f70368da8c43d3da81bf9bbb22f43dfcbc9f96b03c745842f326723c091c7" }, "watch": {"kind": "github-tag", "repo": "lsyncd/lsyncd"}, "deps": [ "lua", "rsync" ], "env_packages": [], "static": true, "nss": false, "check": "t=$(mktemp -d) && bin/lsyncd -version | first && if [ -n \"$HOST\" ]; then echo \"lsyncd 2.3.1: the sync not run in a cross build (it runs the app's rsync, whose receiver finds no folder under qemu-user; see the rsync recipe)\"; else mkdir -p \"$t/src/sub\" \"$t/dst\" && printf 'first file' > \"$t/src/sub/a.txt\" && printf 'settings { nodaemon = true, logfile = \"%s/log\", statusFile = \"%s/status\", onepass = %s }\\nsync { default.rsync, source = \"%s/src/\", target = \"%s/dst/\", delay = 1, rsync = { binary = \"%s/bin/rsync\", archive = true } }\\n' \"$t\" \"$t\" true \"$t\" \"$t\" \"$PREFIX\" > \"$t/once.lua\" && bin/lsyncd \"$t/once.lua\" > \"$t/once.out\" 2>&1 && has -x 'first file' < \"$t/dst/sub/a.txt\" && sed 's/onepass = true/onepass = false/' \"$t/once.lua\" > \"$t/live.lua\" && { bin/lsyncd \"$t/live.lua\" > \"$t/live.out\" 2>&1 & echo $! > \"$t/pid\"; } && for i in $(seq 1 100); do grep -q 'Startup of' \"$t/live.out\" \"$t/log\" 2>/dev/null && break; sleep 0.1; done && printf 'second file' > \"$t/src/sub/b.txt\" && for i in $(seq 1 100); do [ -f \"$t/dst/sub/b.txt\" ] && break; sleep 0.1; done && has -x 'second file' < \"$t/dst/sub/b.txt\" && echo 'lsyncd 2.3.1: a tree copied by rsync in one pass, then a new file picked up by inotify and synced'; r=$?; [ $r = 0 ] || cat \"$t\"/*.out \"$t/log\" >&2 2>/dev/null; [ -f \"$t/pid\" ] && kill \"$(cat \"$t/pid\")\" 2>/dev/null; rm -rf \"$t\"; exit $r; fi" }