diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/sisu/v0/sysenv.rb | 62 |
1 files changed, 49 insertions, 13 deletions
diff --git a/lib/sisu/v0/sysenv.rb b/lib/sisu/v0/sysenv.rb index 2e24954c..22a0bc4a 100644 --- a/lib/sisu/v0/sysenv.rb +++ b/lib/sisu/v0/sysenv.rb @@ -149,6 +149,8 @@ module SiSU_Env PROCESSING_LATEX=:processing_latex PROCESSING_TEXINFO=:processing_texinfo PROCESSING_LOUT=:processing_lout + PROCESSING_SQLITE=:processing_sqlite + PROCESSING_POSTGRESQL=:processing_postgresql PROCESSING_ENCODING=:processing_encoding PAPERSIZE=:papersize LANGUAGE=:language @@ -189,6 +191,8 @@ module SiSU_Env PROCESSING_LATEX => 'tex', PROCESSING_TEXINFO => 'texinfo', PROCESSING_LOUT => 'lout', + PROCESSING_SQLITE => 'sqlite', + PROCESSING_POSTGRESQL=> 'postgresql', PROCESSING_ENCODING => 'encoding', #TEXINFO_STUB => 'texinfo', PAPERSIZE => 'A4', #A4, US_letter, book_b5, book_a5, US_legal @@ -1423,15 +1427,21 @@ WOK pth end def dal - pth=if defined? @rc['processing']['dal']; "#{processing}/#{@rc['processing']['dal']}" - else "#{processing}/#{defaults[:processing_dal]}" + pth=if defined? @rc['processing']['dal'] \ + and not @rc['processing']['dal'].nil? \ + and not @rc['processing']['dal'].empty? + "#{processing}/#{@rc['processing']['dal']}" + else "#{processing}/#{defaults[:processing_dal]}" end mkdir_p(pth) unless FileTest.directory?(pth) pth end def tune - pth=if defined? @rc['processing']['tune']; "#{processing}/#{@rc['processing']['tune']}" - else "#{processing}/#{defaults[:processing_tune]}" + pth=if defined? @rc['processing']['tune'] \ + and not @rc['processing']['tune'].nil? \ + and not @rc['processing']['tune'].empty? + "#{processing}/#{@rc['processing']['tune']}" + else "#{processing}/#{defaults[:processing_tune]}" end mkdir_p(pth) unless FileTest.directory?(pth) pth @@ -1440,15 +1450,21 @@ WOK "#{processing}/odf" end def tex - pth=if defined? @rc['processing']['latex']; "#{processing}/#{@rc['processing']['latex']}" - else "#{processing}/#{defaults[:processing_latex]}" + pth=if defined? @rc['processing']['latex'] \ + and not @rc['processing']['latex'].nil? \ + and not @rc['processing']['latex'].empty? + "#{processing}/#{@rc['processing']['latex']}" + else "#{processing}/#{defaults[:processing_latex]}" end mkdir_p(pth) unless FileTest.directory?(pth) pth end def texi - pth=if defined? @rc['processing']['texinfo']; "#{processing}/#{@rc['processing']['texinfo']}" - else "#{processing}/#{defaults[:processing_texinfo]}" + pth=if defined? @rc['processing']['texinfo'] \ + and not @rc['processing']['texinfo'].nil? \ + and not @rc['processing']['texinfo'].empty? + "#{processing}/#{@rc['processing']['texinfo']}" + else "#{processing}/#{defaults[:processing_texinfo]}" end mkdir_p(pth) unless FileTest.directory?(pth) pth @@ -1457,8 +1473,31 @@ WOK "#{processing}/#{defaults[:processing_texinfo]}" end def lout - pth=if defined? @rc['processing']['lout']; "#{processing}/#{@rc['processing']['lout']}" - else "#{processing}/#{defaults[:processing_lout]}" + pth=if defined? @rc['processing']['lout'] \ + and not @rc['processing']['lout'].nil? \ + and not @rc['processing']['lout'].empty? + "#{processing}/#{@rc['processing']['lout']}" + else "#{processing}/#{defaults[:processing_lout]}" + end + mkdir_p(pth) unless FileTest.directory?(pth) + pth + end + def sqlite + pth=if defined? @rc['processing']['sqlite'] \ + and not @rc['processing']['sqlite'].nil? \ + and not @rc['processing']['sqlite'].empty? + "#{processing}/#{@rc['processing']['sqlite']}" + else "#{processing}/#{defaults[:processing_sqlite]}" + end + mkdir_p(pth) unless FileTest.directory?(pth) + pth + end + def postgresql + pth=if defined? @rc['processing']['postgresql'] \ + and not @rc['processing']['postgresql'].nil? \ + and not @rc['processing']['postgresql'].empty? + "#{processing}/#{@rc['processing']['postgresql']}" + else "#{processing}/#{defaults[:processing_postgresql]}" end mkdir_p(pth) unless FileTest.directory?(pth) pth @@ -1475,9 +1514,6 @@ WOK if defined? @rc['project']['path']; "#{home}/#{@rc['project']['path']}" end end - def sqlite - "#{home}/sqlite" - end def cgi if defined? @rc['webserv']['cgi']; "#{@rc['webserv']['cgi']}" else defaults[:webserv_cgi] |