diff options
author | Lauri Leukkunen <lle@rahina.org> | 2007-11-19 02:50:50 +0200 |
---|---|---|
committer | Lauri Leukkunen <lle@rahina.org> | 2007-11-19 23:54:37 +0200 |
commit | 9c9c2cf90c4cb92b4c163067f637bc8a18732150 (patch) | |
tree | c099516e92a4006586310ac5091f9ae01019c9de /lua_scripts/main.lua | |
parent | 0d237a39b06b91674fa26c308270018989542a77 (diff) |
Restructure lua infra
Signed-off-by: Lauri Leukkunen <lle@rahina.org>
Diffstat (limited to 'lua_scripts/main.lua')
-rw-r--r-- | lua_scripts/main.lua | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/lua_scripts/main.lua b/lua_scripts/main.lua new file mode 100644 index 0000000..f017fca --- /dev/null +++ b/lua_scripts/main.lua @@ -0,0 +1,20 @@ +-- Scratchbox2 Lua main file +-- Copyright (C) 2006, 2007 Lauri Leukkunen +-- Licensed under MIT license. + + +function do_file(filename) + f, err = loadfile(filename) + if (f == nil) then + error("\nError while loading " .. filename .. ": \n" + .. err .. "\n") + else + f() -- execute the loaded chunk + end +end + +lua_scripts = os.getenv("SBOX_LUA_SCRIPTS") + +do_file(lua_scripts .. "/mapping.lua") +do_file(lua_scripts .. "/argvenvp.lua") + |