more changes to work on ARM

This commit is contained in:
Eduardo Bart
2011-12-30 02:50:19 -02:00
parent a394033872
commit e95973174c
12 changed files with 33 additions and 23 deletions

View File

@@ -32,25 +32,10 @@ function createEnvironment()
return env
end
function getCallingScriptSourcePath(depth)
depth = depth or 2
local info = debug.getinfo(1+depth, "Sn")
local path
if info.short_src then
path = info.short_src:match("(.*)/.*")
end
if not path then
path = '/'
elseif path:sub(0, 1) ~= '/' then
path = '/' .. path
end
return path
end
function resolveFileFullPath(filePath, depth)
depth = depth or 1
if filePath:sub(0, 1) ~= '/' then
return getCallingScriptSourcePath(depth+1) .. '/' .. filePath
return getCurrentSourcePath(depth+1) .. '/' .. filePath
else
return filePath
end