Sun, 06 Aug 2023 14:32:25 +0300
Preliminary breadcrumb support
3 | 1 | |
7
038275cd92ed
Convert module stuff to lua 5.3
Tuomo Valkonen <tuomov@iki.fi>
parents:
3
diff
changeset
|
2 | --@module dependency |
3 | 3 | |
7
038275cd92ed
Convert module stuff to lua 5.3
Tuomo Valkonen <tuomov@iki.fi>
parents:
3
diff
changeset
|
4 | local dependency={} |
3 | 5 | |
7
038275cd92ed
Convert module stuff to lua 5.3
Tuomo Valkonen <tuomov@iki.fi>
parents:
3
diff
changeset
|
6 | lfs=require('lfs') |
038275cd92ed
Convert module stuff to lua 5.3
Tuomo Valkonen <tuomov@iki.fi>
parents:
3
diff
changeset
|
7 | |
038275cd92ed
Convert module stuff to lua 5.3
Tuomo Valkonen <tuomov@iki.fi>
parents:
3
diff
changeset
|
8 | function dependency.simple_update_check(tgt, srcs) |
3 | 9 | local a=lfs.attributes(tgt) |
10 | if not a then | |
11 | return true | |
12 | end | |
13 | for _, src in ipairs(srcs) do | |
14 | local b=lfs.attributes(src) | |
15 | if not b or b.modification > a.modification then | |
16 | return true | |
17 | end | |
18 | end | |
19 | return false | |
20 | end | |
7
038275cd92ed
Convert module stuff to lua 5.3
Tuomo Valkonen <tuomov@iki.fi>
parents:
3
diff
changeset
|
21 | |
038275cd92ed
Convert module stuff to lua 5.3
Tuomo Valkonen <tuomov@iki.fi>
parents:
3
diff
changeset
|
22 | return dependency |