forked from len0rd/rockbox
WIP for passing arguments to lua scripts
args are recognized by adding ?arg to the end of the script path
The easiest way to do this currently is to use the function rb.restart_lua
local sfile = rawget(_G, "_fullpath") or ""
local sArgs = rawget(_G, "_arguments")
if not sArgs then
rb.restart_lua(sfile .. "?my arguments")
else
rb.splash(1000, sfile .. "?" .. sArgs)
end
I'd eventually like to figure out a sensible way to do this from a
shortcut / quick list
Change-Id: I2b60fe3b8f1d04b57361fe532510bd6afee59fbf
|
||
|---|---|---|
| .. | ||
| include_lua | ||
| action_helper.pl | ||
| button_helper.pl | ||
| lapi.c | ||
| lapi.h | ||
| lauxlib.c | ||
| lauxlib.h | ||
| lbaselib.c | ||
| lbitlib.c | ||
| lcode.c | ||
| lcode.h | ||
| ldebug.c | ||
| ldebug.h | ||
| ldo.c | ||
| ldo.h | ||
| ldump.c | ||
| lfunc.c | ||
| lfunc.h | ||
| lgc.c | ||
| lgc.h | ||
| liolib.c | ||
| llex.c | ||
| llex.h | ||
| llimits.h | ||
| lmathlib.c | ||
| lmem.c | ||
| lmem.h | ||
| loadlib.c | ||
| lobject.c | ||
| lobject.h | ||
| lopcodes.c | ||
| lopcodes.h | ||
| loslib.c | ||
| lparser.c | ||
| lparser.h | ||
| lstate.c | ||
| lstate.h | ||
| lstring.c | ||
| lstring.h | ||
| lstrlib.c | ||
| ltable.c | ||
| ltable.h | ||
| ltablib.c | ||
| ltm.c | ||
| ltm.h | ||
| lua.h | ||
| lua.make | ||
| lua_user.c | ||
| lua_user.h | ||
| luaconf.h | ||
| luadir.c | ||
| luadir.h | ||
| lualib.h | ||
| lundump.c | ||
| lundump.h | ||
| lvm.c | ||
| lvm.h | ||
| lzio.c | ||
| lzio.h | ||
| Makefile | ||
| rbdefines_helper.pl | ||
| README | ||
| rockaux.c | ||
| rockconf.h | ||
| rocklib.c | ||
| rocklib.h | ||
| rocklib_aux.pl | ||
| rocklib_events.c | ||
| rocklib_events.h | ||
| rocklib_img.c | ||
| rocklib_img.h | ||
| rocklibc.h | ||
| rocklua.c | ||
| settings_helper.pl | ||
| SOURCES | ||
| strftime.c | ||
| strpbrk.c | ||
| strstr.c | ||
| strtol.c | ||
| strtoul.c | ||
| tlsf_helper.c | ||
The following files are (with slight modifications for Rockbox) from dietlibc
version 0.31 which is licensed under the GPL version 2:
gmtime.c
strftime.c
strpbrk.c
strtol.c
strtoul.c
strstr.c