Sun, 13 Sep 2009 22:22:47 +0300
Improvements
3 | 1 | |
2 | module("dependency", package.seeall) | |
3 | ||
4 | require('lfs') | |
5 | ||
6 | function simple_update_check(tgt, srcs) | |
7 | local a=lfs.attributes(tgt) | |
8 | if not a then | |
9 | return true | |
10 | end | |
11 | for _, src in ipairs(srcs) do | |
12 | local b=lfs.attributes(src) | |
13 | if not b or b.modification > a.modification then | |
14 | return true | |
15 | end | |
16 | end | |
17 | return false | |
18 | end |