summaryrefslogtreecommitdiff
path: root/lua_scripts/main.lua
blob: f017fca3480618b7c65de9319792624ded923cde (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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")