mirror of
https://github.com/octoleo/lsyncd.git
synced 2025-01-22 22:58:35 +00:00
fix what i broke
This commit is contained in:
parent
3ae6c8fb77
commit
1b6db3f093
14
lsyncd.lua
14
lsyncd.lua
@ -2236,9 +2236,9 @@ local functionWriter = (function()
|
|||||||
ft = 'function(event, event2)\n'
|
ft = 'function(event, event2)\n'
|
||||||
end
|
end
|
||||||
ft = ft..
|
ft = ft..
|
||||||
[[ log('Normal', 'Event ', event.etype, \n]]..
|
" log('Normal', 'Event ', event.etype, \n"..
|
||||||
[[ ' spawns action "]].. str..[["')\n]]..
|
" ' spawns action \"".. str.."\"')\n"..
|
||||||
[[ spawn(event]]
|
" spawn(event"
|
||||||
for _, v in ipairs(args) do
|
for _, v in ipairs(args) do
|
||||||
ft = ft..',\n '..v
|
ft = ft..',\n '..v
|
||||||
end
|
end
|
||||||
@ -2281,9 +2281,9 @@ local functionWriter = (function()
|
|||||||
end
|
end
|
||||||
-- TODO do array joining instead
|
-- TODO do array joining instead
|
||||||
ft = ft..
|
ft = ft..
|
||||||
[[ log('Normal', 'Event ',event.etype,\n]]..
|
" log('Normal', 'Event ',event.etype,\n"..
|
||||||
[[ ' spawns shell "]]..lc..[[")\n]]..
|
" ' spawns shell \""..lc.."\"')\n"..
|
||||||
[[ spawnShell(event, ']]..cmd..[[',]]
|
" spawnShell(event, '"..cmd.."'"
|
||||||
for _, v in ipairs(args) do
|
for _, v in ipairs(args) do
|
||||||
ft = ft..',\n '..v
|
ft = ft..',\n '..v
|
||||||
end
|
end
|
||||||
@ -2829,7 +2829,7 @@ function runner.initialize(firstTime)
|
|||||||
for _, fn in ipairs(ufuncs) do
|
for _, fn in ipairs(ufuncs) do
|
||||||
if type(config[fn]) == 'string' then
|
if type(config[fn]) == 'string' then
|
||||||
local ft = functionWriter.translate(config[fn])
|
local ft = functionWriter.translate(config[fn])
|
||||||
config[fn] = assert(loadstring("return " .. ft))()
|
config[fn] = assert(loadstring('return '..ft))()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user