diff options
Diffstat (limited to 'scripts/update_doc')
-rwxr-xr-x | scripts/update_doc | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/scripts/update_doc b/scripts/update_doc index f5518e02..8f9ee6c0 100755 --- a/scripts/update_doc +++ b/scripts/update_doc @@ -1,10 +1,25 @@ #!/usr/bin/lua -- Copyright 2007-2010 Mitchell mitchell<att>caladbolg.net. See LICENSE. +-- Rename *.lua.doc to *.lua so LuaDoc detects them. +local lfs = require 'lfs' +for file in lfs.dir('../core') do + if file:match('^%..-%.luadoc$') then + os.rename('../core/'..file, '../core/'..file:match('^%..-%.lua')) + end +end + -- Generate LuaDoc. os.execute('rm -rf ../doc/modules/') os.execute('cd ../; luadoc -d doc/ --nofiles modules/ core/ lexers/lexer.lua') +-- Revert to *.lua.doc +for file in lfs.dir('../core') do + if file:match('^%..-%.lua$') then + os.rename('../core/'..file, '../core/'..file..'doc') + end +end + -- Insert Markdown in modules into LuaDoc. local p = io.popen('grep -r "\\-\\- Markdown:" ../*') for file in p:lines() do @@ -81,7 +96,7 @@ for mdfile in p:lines() do <div id="about"> <p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p> </div> - </div> + </div> </body> </html> ]] |