Made the build system accept --cfgfile and --modfile

Also added a dir of example configs.
This contributes to #1.
This commit is contained in:
Izaya 2017-04-23 19:17:22 +10:00
parent 50ca1050b1
commit a77d0c6356
7 changed files with 41 additions and 2 deletions

5
build-production.cfg Normal file
View File

@ -0,0 +1,5 @@
optimise yes
listmods no
test yes
log yes
opath kernel.lua

View File

@ -19,10 +19,19 @@ end
print("Initializing and reading configuration")
ts={}
tA = {...}
for k,v in ipairs(tA) do
if type(v) == "string" then
if v:sub(1,10) == "--cfgfile=" then
cfgfile = v:sub(11)
elseif v:sub(1,10) == "--modfile=" then
modfile = v:sub(11)
end
end
end
ss=""
cfgfile = cfgfile or "build.cfg"
modfile = modfile or "modules.cfg"
cfg={}
cfgfile = tA[1] or "build.cfg"
modfile = tA[2] or "modules.cfg"
f=io.open(cfgfile,"rb")
repeat
line = f:read("*l")

14
configs/desktop.cfg Normal file
View File

@ -0,0 +1,14 @@
base/header.lua
drivers/dterm.lua
library/print.lua
drivers/keyboard.lua
library/net.lua
library/fs-min.lua
library/fs-std.lua
library/fs-ext.lua
util/fs-automount.lua
applications/shutil.lua
applications/evproxy-srv.lua
applications/evproxy-client.lua
applications/luash.lua
base/footer.lua

View File

@ -0,0 +1,4 @@
base/header.lua
library/net.lua
applications/rexec.lua
base/footer.lua

3
configs/minimal-net.cfg Normal file
View File

@ -0,0 +1,3 @@
base/header.lua
library/net.lua
base/footer.lua

2
configs/minimal.cfg Normal file
View File

@ -0,0 +1,2 @@
base/header.lua
base/footer.lua

View File

@ -8,5 +8,7 @@ library/fs-std.lua
library/fs-ext.lua
util/fs-automount.lua
applications/shutil.lua
applications/evproxy-srv.lua
applications/evproxy-client.lua
applications/luash.lua
base/footer.lua