summaryrefslogtreecommitdiffhomepage
path: root/libs/uvl/root/usr
diff options
context:
space:
mode:
Diffstat (limited to 'libs/uvl/root/usr')
-rwxr-xr-xlibs/uvl/root/usr/bin/uvlc22
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