diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2008-08-17 23:30:23 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2008-08-17 23:30:23 +0000 |
commit | 6d5efc7925f8abf7ab64ad76b0a70ddfb8d21a93 (patch) | |
tree | 4a366cdb1717605de6165cc8ac1183b4a4a0e280 /libs/uvl/root/usr | |
parent | 3ea4572c35a3aab46daddbc966d4c65ca86f102c (diff) |
* luci/libs: properly implement and document --schemedir in uvl cli
Diffstat (limited to 'libs/uvl/root/usr')
-rwxr-xr-x | libs/uvl/root/usr/bin/uvl | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/libs/uvl/root/usr/bin/uvl b/libs/uvl/root/usr/bin/uvl index 3c9e53f20..9fe34127f 100755 --- a/libs/uvl/root/usr/bin/uvl +++ b/libs/uvl/root/usr/bin/uvl @@ -68,7 +68,8 @@ $Id: uvl.lua 2873 2008-08-17 21:43:56Z jow $ Usage: uvl --help - uvl [--silent] [--no-strict-sections] [--no-strict-options] + uvl [--silent] [--schemedir=DIR] + [--no-strict-sections] [--no-strict-options] [--no-strict-validators] config[.section[.option]] Options: @@ -78,6 +79,9 @@ Options: --silent Don't produce any output. + --schemedir=DIR + Use DIR as scheme directory. + --no-strict-sections Don't treat sections found in config but not in scheme as error. @@ -96,7 +100,10 @@ else luci.uvl.STRICT_EXTERNAL_VALIDATORS = ( options['no-strict-validators'] and false or true ) - local uvl = luci.uvl.UVL( options['schemedir'] ) + local uvl = luci.uvl.UVL( + type(options.schemedir) == "string" and options.schemedir or nil + ) + local cso = luci.util.split( arguments[1], "." ) local ok, err = uvl:validate( unpack(cso) ) |