mirror of
https://github.com/octoleo/lsyncd.git
synced 2025-01-06 08:40:44 +00:00
a little elegance
This commit is contained in:
parent
6870d83001
commit
bf8fc03480
@ -16,10 +16,7 @@ end
|
||||
-----
|
||||
-- initializes the pseudo random generator
|
||||
-- if environemnt "SEED" is set, use that as seed.
|
||||
local seed = os.getenv("SEED")
|
||||
if not seed then
|
||||
seed = os.time()
|
||||
end
|
||||
local seed = os.getenv("SEED") or os.time()
|
||||
math.randomseed(seed)
|
||||
cwriteln("random seed: ", seed)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user