diff options
Diffstat (limited to 'lib/sisu/v0/sysenv.rb')
-rw-r--r-- | lib/sisu/v0/sysenv.rb | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/lib/sisu/v0/sysenv.rb b/lib/sisu/v0/sysenv.rb index 15dbeba5..58ad1bf8 100644 --- a/lib/sisu/v0/sysenv.rb +++ b/lib/sisu/v0/sysenv.rb @@ -734,7 +734,7 @@ module SiSU_Env include FileUtils attr_accessor :filename,:sys,:home,:hostname,:user,:env,:rc,:www,:fnb,:fnn,:fnt,:flv,:webserv_path,:stub_pwd,:webserv_host_cgi,:webserv_port_cgi,:processing,:etc,:yamlrc_dir @@image_flag,@@local_image=true,true #warning on @@image_flag - @@fb=nil + @@fb=@@man_path=nil,nil def initialize(fns='',md=nil) super() #you may not want to re-execute this tatic info so frequently! @fns,@md=fns,md @@ -1141,14 +1141,12 @@ WOK @webserv_path end def webserv #separation required for webrick which cannot use path.output (different requirements as no file is passed) - man_path=if defined? @rc['webserv']['path'] and @rc['webserv']['path'] =~/\S\S+/ - man_path=case @rc['webserv']['path'] - when /^\/\S+/; @rc['webserv']['path'] - when /^\.\/(\S+)/; "#{pwd}/#{$1}" - when /^~\/(\S+)/; "#{home}/#{$1}" - else "#{home}/#{@rc['webserv']['path']}" + man_path=if @@man_path.nil? + man_path=if defined? @rc['webserv']['path'] and @rc['webserv']['path'] =~/\S\S+/ + man_path=@@man_path=File.expand_path(@rc['webserv']['path']) + else nil end - else nil + else manpath=@@man_path end @webserv_path=if defined? man_path and File.writable?("#{man_path}/."); man_path #web server path as configured in rc file elsif FileTest.directory?(defaults[:webserv_path]) and File.writable?("#{defaults[:webserv_path]}/.") #web server path default @@ -2097,7 +2095,7 @@ WOK end def images File.mkpath("#{@env.path.output}/_sisu") unless FileTest.directory?("#{@env.path.output}/_sisu") - File.symlink("../../_sisu/image", "#{@env.path.output}/_sisu/image") unless File.symlink?("#{@env.path.output}/_sisu/image") + File.symlink("../../_sisu/image", "#{@env.path.output}/_sisu/image") unless File.exist?("#{@env.path.output}/_sisu/image") or File.symlink?("#{@env.path.output}/_sisu/image") end def man_forms #File.symlink("../../man/form", "#{@env.path.output}/man/form") unless File.symlink?("#{@env.path.output}/man/form") == true |