diff options
author | Ralph Amissah <ralph@amissah.com> | 2007-10-15 11:06:50 +0100 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2007-10-15 11:06:50 +0100 |
commit | 4ef892c96f0e707085789ae4f2082565a9363c71 (patch) | |
tree | a0f1dc2a8e4d77c24b3290d6b6241e026a9c6f75 | |
parent | composite master renaming, and; multiple remote puts (rsync|scp) (diff) |
remote server configuration info set in sisurc.yml for multiple hosts, sysenv and help
sisurc.yml remote host settings takes both old and new configuration notation
new being through use of Array for each host '-' separator, [example is provided]
-rw-r--r-- | CHANGELOG | 19 | ||||
-rw-r--r-- | lib/sisu/v0/help.rb | 44 | ||||
-rw-r--r-- | lib/sisu/v0/sysenv.rb | 43 |
3 files changed, 96 insertions, 10 deletions
@@ -17,12 +17,16 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.62.0.orig.tar.gz * directory shunting ... [some resulting re-initialization necessary] * markup source directory (src), all shared markup source placed in a - common directory [instead of being in output files generated - sub-directory] + common directory (instead of being in output files generated + sub-directory) [NOTE: New src directory for shared markup source output + required] * images, output images used by html moved, now in image directory instead - of image_local; system images moved from image to image_sys [to make sure + of image_local; system images moved from image to image_sys (to make sure they are always available, i.e. not written over (by subsequent images - given same name)] + given same name)) [NOTE: Image directories moved and may need to be + tended to manually as existing directories are not overwritten, + _sisu/image_local is moved to _sisu/image (and old _sisu/image is now + _sisu/image_sys) ] * remote, (put, get) placed in single file (consider separating later) @@ -33,9 +37,10 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.62.0.orig.tar.gz * copy images associated with document along with document, does not take care of skins though, for all images still need to use -CC - * sysenv remote placement, and config, define multiple hosts for rsync or scp - placement of output (one set of displayed urls associated with such output - files) + * sysenv remote placement, and config, able to define multiple hosts for + rsync or scp placement of output, for this sisurc.yml remote info given + provided as array with '-' separator [old form of notation is also + honoured] * special character exceptions, exception, fix (:code underscore angle bracket issue) diff --git a/lib/sisu/v0/help.rb b/lib/sisu/v0/help.rb index e9f3906b..50539d9d 100644 --- a/lib/sisu/v0/help.rb +++ b/lib/sisu/v0/help.rb @@ -1015,6 +1015,47 @@ WOK else puts 'SiSU version information not available' end end + def rhost + @ls=leading_spaces=' '*49 + @rhost=SiSU_Env::Info_remote_host.new.rhost + def r1 + if @rhost.r1; @rhost.r1 + "\n" + else '' + end + end + def r2 + if @rhost.r2; @ls + @rhost.r2 + "\n" + else '' + end + end + def r3 + if @rhost.r3; @ls + @rhost.r3 + "\n" + else '' + end + end + def r4 + if @rhost.r4; @ls + @rhost.r4 + "\n" + else '' + end + end + def r5 + if @rhost.r5; @ls + @rhost.r5 + "\n" + else '' + end + end + def r6 + if @rhost.r6; @ls + @rhost.r6 + "\n" + else '' + end + end + def note + msg='(remote settings user and host set in sisurc.yml under remote:)' + if @rhost.r1; @ls + msg + else msg + end + end + self + end def environment cf_defaults=SiSU_Env::Info_processing_flag.new sisu_version @@ -1022,8 +1063,7 @@ WOK #{@cX.green}current and output directories#{@cX.off} user: #{@cX.blue}#{@env.user}#{@cX.off} home: #{@cX.blue}#{@env.path.home}#{@cX.off} - remote set [remote user]@[remote host]: #{@cX.blue}#{SiSU_Env::Info_remote_host.new.remote_host[:name]}#{@cX.off} - (remote settings user and host set in sisurc.yml under remote:) + remote set [remote user]@[remote host]: #{@cX.blue}#{rhost.r1}#{rhost.r2}#{rhost.r3}#{rhost.r4}#{rhost.r5}#{rhost.r6}#{@cX.off}#{rhost.note} locale (encoding, UTF-8 desired): #{@cX.blue}#{@env.locale}#{@cX.off} current directory: #{@cX.blue}#{@env.path.pwd}#{@cX.off} document output root directory set to: #{@cX.blue}#{@env.path.webserv}#{@cX.off} diff --git a/lib/sisu/v0/sysenv.rb b/lib/sisu/v0/sysenv.rb index 510324c7..a06af89d 100644 --- a/lib/sisu/v0/sysenv.rb +++ b/lib/sisu/v0/sysenv.rb @@ -2021,15 +2021,17 @@ WOK end r elsif (defined? @rc['remote'] and @rc['remote'].class==Hash and defined? @rc['remote']['user'] and defined? @rc['remote']['host']) + r[0]={} r[0][:user]=@rc['remote']['user'] r[0][:host]=@rc['remote']['host'] r[0][:path]=if defined? @rc['remote']['path'] @rc['remote']['path'] else '' end - r[0][:name]="#{r[:user]}@#{r[:host]}:#{r[:path]}" + r[0][:name]="#{r[0][:user]}@#{r[0][:host]}:#{r[0][:path]}" r else + r[0]={} r[0][:name]='.' r[0][:user]='' r[0][:host]='' @@ -2038,6 +2040,45 @@ WOK r end end + def rhost + def r1 + rhost1=if defined? SiSU_Env::Info_remote_host.new.remote_host[0][:name] + SiSU_Env::Info_remote_host.new.remote_host[0][:name] + else nil + end + end + def r2 + rhost2=if defined? SiSU_Env::Info_remote_host.new.remote_host[1][:name] + SiSU_Env::Info_remote_host.new.remote_host[1][:name] + else nil + end + end + def r3 + rhost3=if defined? SiSU_Env::Info_remote_host.new.remote_host[2][:name] + SiSU_Env::Info_remote_host.new.remote_host[2][:name] + else nil + end + end + def r4 + rhost4=if defined? SiSU_Env::Info_remote_host.new.remote_host[3][:name] + SiSU_Env::Info_remote_host.new.remote_host[3][:name] + else nil + end + end + def r5 + rhost5=if defined? SiSU_Env::Info_remote_host.new.remote_host[4][:name] + SiSU_Env::Info_remote_host.new.remote_host[4][:name] + else nil + end + end + def r6 + rhost6=if defined? SiSU_Env::Info_remote_host.new.remote_host[5][:name] + @ls + SiSU_Env::Info_remote_host.new.remote_host[5][:name] + else nil + end + end + self + end end class Info_remote < File_map @@flag_remote=false |