aboutsummaryrefslogtreecommitdiffstats
path: root/PolygLua.lua
diff options
context:
space:
mode:
Diffstat (limited to 'PolygLua.lua')
-rwxr-xr-xPolygLua.lua10
1 files changed, 10 insertions, 0 deletions
diff --git a/PolygLua.lua b/PolygLua.lua
index 5305872..e4cf6db 100755
--- a/PolygLua.lua
+++ b/PolygLua.lua
@@ -42,6 +42,16 @@ local optionsCommon =
42{ 42{
43 help = {help = 'Print the help text.', 43 help = {help = 'Print the help text.',
44 func = function(self, options, a, args, i) 44 func = function(self, options, a, args, i)
45 for i,v in ipairs{'/usr/share/doc/', '/usr/local/share/doc/', './'} do
46 local p = v .. 'README.md'
47 local h = io.open(p, 'r')
48 if nil ~= h then
49 D('Found README file '.. p)
50 Help = h:read('*a')
51 h:close()
52 end
53 end
54
45 print(Help) 55 print(Help)
46 _.usage(args, options, true) 56 _.usage(args, options, true)
47 os.exit(0) 57 os.exit(0)