Differences From
Artifact [60797f7bc4]:
10 10 end
11 11 end
12 12 local posixes = {
13 13 linux = true; osx = true;
14 14 android = true; haiku = true;
15 15 }
16 16 local default_os = 'linux'
17 +local defaultlist = function(env, ...)
18 + local e = os.getenv(env)
19 + local lst = {}
20 + if e then
21 + for v in e:gmatch('([^:]*)') do lst[#lst + 1] = v end
22 + return lst
23 + else return {...} end
24 +end
17 25 local conf = {
18 26 pkg = {};
19 27 dist = default('parsav_dist', coalesce(
20 28 os.getenv('NIX_PATH') and 'nixos',
21 29 os.getenv('NIX_STORE') and 'nixos',
22 30 ''));
23 31 tgttrip = default('parsav_arch_triple'); -- target triple, used in xcomp
................................................................................
26 34 endian = default('parsav_arch_endian', 'little');
27 35 build = {
28 36 id = u.rndstr(6);
29 37 release = u.ingest('release');
30 38 when = os.date();
31 39 };
32 40 feat = {};
41 + backends = defaultlist('parsav_backends', 'pgsql');
42 + braingeniousmode = false;
33 43 }
34 44 if u.ping '.fslckout' or u.ping '_FOSSIL_' then
35 45 if u.ping '_FOSSIL_' then default_os = 'windows' end
36 46 conf.build.branch = u.exec { 'fossil', 'branch', 'current' }
37 47 conf.build.checkout = (u.exec { 'fossil', 'sql',
38 48 [[select value from localdb.vvar where name = 'checkout-hash']]
39 49 }):gsub("^'(.*)'$", '%1')