Sat, 01 Nov 2014 23:34:21 +0000
Lua 5.2 compatibility hack
| 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 |