diff --git a/examples/lbash.lua b/examples/lbash.lua index c51483b..1f17ff7 100644 --- a/examples/lbash.lua +++ b/examples/lbash.lua @@ -21,19 +21,21 @@ prefix = "" -- for testing purposes. uses bash command to hold local dirs in sync. -- bash = { + delay = 0, - maxProcesses = 3, + maxProcesses = 1, + -- calls `cp -r SOURCE/* TARGET` only when there is something in SOURCE onStartup = [[if [ "$(ls -A ^source)" ]; then cp -r ^source* ^target; fi]], - onCreate = prefix..[[cp -r ^sourcePathname ^targetPathname]], + onCreate = prefix..[[cp -r ^sourcePath ^targetPath]], - onModify = prefix..[[cp -r ^sourcePathname ^targetPathname]], + onModify = prefix..[[cp -r ^sourcePath ^targetPath]], - onDelete = prefix..[[rm -rf ^targetPathname]], + onDelete = prefix..[[rm -rf ^targetPath]], - onMove = prefix..[[mv ^o.targetPathname ^d.targetPathname]], + onMove = prefix..[[mv ^o.targetPath ^d.targetPath]], } sync{bash, source="src", target="/path/to/trg/"} diff --git a/lsyncd.lua b/lsyncd.lua index 43fb226..4448a71 100644 --- a/lsyncd.lua +++ b/lsyncd.lua @@ -1403,7 +1403,7 @@ local Syncs = (function() -- loads a default value for an option if not existent local defaultValues = { - 'action', + 'action', 'collapse', 'collapseTable', 'collect', @@ -2927,6 +2927,11 @@ default = { return rc end, + ----- + -- default Delay + -- + delay = 5, + ----- -- called on (re)initalizing of Lsyncd. --