aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2007-09-26 11:14:57 +0100
committerRalph Amissah <ralph@amissah.com>2007-09-26 11:14:57 +0100
commit0770dd950f674b97820b0a5839d0929b96b32762 (patch)
treea4a476bb6a0838cde128871edff668fb0acd2daf /lib
parentdocument gen rantfile, use relative path, (cleaning) (diff)
sysenv, sisurc.yml allow use of relative output paths, expand to absolute
Diffstat (limited to 'lib')
-rw-r--r--lib/sisu/v0/sysenv.rb15
1 files changed, 7 insertions, 8 deletions
diff --git a/lib/sisu/v0/sysenv.rb b/lib/sisu/v0/sysenv.rb
index 15dbeba5..bf474f64 100644
--- a/lib/sisu/v0/sysenv.rb
+++ b/lib/sisu/v0/sysenv.rb
@@ -734,7 +734,8 @@ 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
+ #@@fb=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 +1142,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