mirror of
https://github.com/octoleo/lsyncd.git
synced 2025-01-23 07:08:33 +00:00
working on rand test
This commit is contained in:
parent
e0e7a2a705
commit
e9e9e81fbf
@ -37,9 +37,25 @@ if lpid == 0 then
|
|||||||
os.exit(-1);
|
os.exit(-1);
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- cleans the targets
|
||||||
|
os.execute("rm -rf src/*")
|
||||||
|
os.execute("rm -rf trg/*")
|
||||||
posix.sleep(1)
|
posix.sleep(1)
|
||||||
|
|
||||||
|
|
||||||
|
while true do
|
||||||
|
-- throw a die what to do
|
||||||
|
local acn = math.random(2)
|
||||||
|
if acn == 1 then
|
||||||
|
-- creates a directory
|
||||||
|
print(string.char(96))
|
||||||
|
end
|
||||||
|
if acn == 2 then
|
||||||
|
-- creates a files
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
-- kills the lsyncd daemon
|
-- kills the lsyncd daemon
|
||||||
posix.kill(lpid)
|
posix.kill(lpid)
|
||||||
local _, exitmsg, exitcode = posix.wait(lpid)
|
local _, exitmsg, exitcode = posix.wait(lpid)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user