diff options
-rw-r--r-- | CHANGELOG | 2 | ||||
-rw-r--r-- | data/doc/sisu/sisu_markup_samples/sisu_manual/Rantfile | 2 | ||||
-rw-r--r-- | data/doc/sisu/sisu_markup_samples/sisu_manual/_sisu/sisurc.yml | 4 | ||||
-rw-r--r-- | lib/sisu/v0/sysenv.rb | 15 |
4 files changed, 11 insertions, 12 deletions
@@ -27,6 +27,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.60.0.orig.tar.gz that as a package on its own, (request that debian consider it for inclusion as such). + * sysenv, sisurc.yml allow use of relative output paths, expand to absolute + %% sisu_0.59.1.orig.tar.gz (2007-09-25:39/2) http://www.jus.uio.no/sisu/pkg/src/sisu_0.59.1.orig.tar.gz cf512ec871aeb7cdabc0b3b35b7e6d05 10952059 sisu_0.59.1.orig.tar.gz diff --git a/data/doc/sisu/sisu_markup_samples/sisu_manual/Rantfile b/data/doc/sisu/sisu_markup_samples/sisu_manual/Rantfile index cf356746..41ad2c08 100644 --- a/data/doc/sisu/sisu_markup_samples/sisu_manual/Rantfile +++ b/data/doc/sisu/sisu_markup_samples/sisu_manual/Rantfile @@ -330,6 +330,4 @@ task :help do rant_help end __END__ -path_man_sisu_output='/home/ralph/grotto/theatre/dbld/builds/sisu/sisu-doc/doc/manuals_generated/sisu_manual/man' -path_man_sisu_output='~sisudocout/sisu_manual/man' #path_man_sisu_output='../../../manuals_generated/sisu_manual/man' diff --git a/data/doc/sisu/sisu_markup_samples/sisu_manual/_sisu/sisurc.yml b/data/doc/sisu/sisu_markup_samples/sisu_manual/_sisu/sisurc.yml index 4eba930c..876c338a 100644 --- a/data/doc/sisu/sisu_markup_samples/sisu_manual/_sisu/sisurc.yml +++ b/data/doc/sisu/sisu_markup_samples/sisu_manual/_sisu/sisurc.yml @@ -24,9 +24,9 @@ #% presentation/web directory, main path and subdirectories (most subdirectories are created automatically based on markup directory name) webserv: url_root: 'http://sisudoc.org' #without dir stub, e.g. this dir would map to http://www.jus.uio.no/sisu - path: '~/grotto/theatre/dbld/builds/sisu/sisu-doc/doc/manuals_generated' #either (i) / [full path from root] or (ii) ~/ [home] or (iii) ./ [pwd] or (iv) will be made from home + path: '../../../../../../sisu-doc/doc/manuals_generated' #url_root: 'http://www.jus.uio.no/sisu' #without dir stub, e.g. this dir would map to http://www.jus.uio.no/sisu - #path: '/var/www' #either (i) / [full path from root] or (ii) ~/ [home] or (iii) ./ [pwd] or (iv) will be made from home + #path: '/var/www' # [absolute or relative path] #images: 'sisu/image' #man: 'man' #php: 'php' 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 |