From c8ef012b3a73fbf548379b386ead43779b744562 Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Thu, 11 Sep 2008 00:50:19 +0000 Subject: Completed first part of UVLDoc --- build/uvldoc | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 build/uvldoc (limited to 'build/uvldoc') diff --git a/build/uvldoc b/build/uvldoc new file mode 100755 index 000000000..a6e9cc8e6 --- /dev/null +++ b/build/uvldoc @@ -0,0 +1,24 @@ +#!/usr/bin/env lua +local fs = require "luci.fs" +local util = require "luci.util" +local uvldoc = require "luci.uvldoc.renderer" + +pcall(function() + require "uci" + require "luci.model.uci".cursor = function(config, save) + return uci.cursor(config or arg[1] .. "/etc/config", save or arg[1] .. "/tmp/.uci") + end +end) + +local schemes = {} +if not arg[4] or #arg[4] == 0 then + for i, name in ipairs(fs.dir(arg[2].."/default/")) do + if name ~= "." and name ~= ".." then + schemes[#schemes+1] = name + end + end +else + schemes = util.split(arg[4], "[,;%s]+", nil, true) +end + +uvldoc.Generator(schemes, arg[3], arg[2]):make() -- cgit v1.2.3