diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2008-09-05 16:46:51 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2008-09-05 16:46:51 +0000 |
commit | 3315203f2f3e9ff5a76e788e9873e84e171ae876 (patch) | |
tree | 8649b2273e1a6402467e4925f962df20a66ae397 /libs/uvl/root/usr/bin | |
parent | 8af9060efd8f47966e898cd12e0515da3b097203 (diff) |
* luci/libs/uvl:
- implement bytecode loading in luci.uvl.read_scheme()
- add "uvlc" executable to byte-compile arbitary schemes
- add lib/uci/schema/bytecode/ directory
Diffstat (limited to 'libs/uvl/root/usr/bin')
-rwxr-xr-x | libs/uvl/root/usr/bin/uvlc | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/libs/uvl/root/usr/bin/uvlc b/libs/uvl/root/usr/bin/uvlc new file mode 100755 index 0000000000..c07cc54ccd --- /dev/null +++ b/libs/uvl/root/usr/bin/uvlc @@ -0,0 +1,22 @@ +#!/usr/bin/lua + + +if arg[1] then + require("luci.util") + require("luci.uvl") + require("luci.fs") + + local uvl = luci.uvl.UVL() + local scheme, err = uvl:get_scheme( arg[1] ) + + if scheme then + luci.fs.writefile( + "%s/bytecode/%s.lua" %{ uvl.schemedir, arg[1] }, + luci.util.get_bytecode(scheme) + ) + else + print("Error:", err:string()) + end +else + print( "Usage: uvlc <scheme>" ) +end |