diff options
author | Ralph Amissah <ralph@amissah.com> | 2013-03-18 00:03:50 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2013-03-18 00:03:50 -0400 |
commit | c4a842ffdc9d24b79eae40dfaec8e43a6a796e30 (patch) | |
tree | 2985bc592b4784d0391e0f009cdfca8a9d17390b /lib/sisu/v4/share_src.rb | |
parent | v4: version & changelog (diff) |
v4: share document source, markup text file &/or sisupodsisu_4.0.15
* processing flow, correct sequence
* terminal reporting
Diffstat (limited to 'lib/sisu/v4/share_src.rb')
-rw-r--r-- | lib/sisu/v4/share_src.rb | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/sisu/v4/share_src.rb b/lib/sisu/v4/share_src.rb index 725ded35..34c1d713 100644 --- a/lib/sisu/v4/share_src.rb +++ b/lib/sisu/v4/share_src.rb @@ -64,7 +64,6 @@ module SiSU_Markup include SiSU_Source require_relative 'sysenv' # sysenv.rb include SiSU_Env - pwd=Dir.pwd class Source < SiSU_Source::SiSUpodSource def initialize(opt,build=nil,place=nil) super(opt,build,place) @@ -73,19 +72,19 @@ module SiSU_Markup def read unless @opt.cmd =~/q/ @opt.cmd=~/[MVvz]/ \ - ? SiSU_Screen::Ansi.new(@opt.cmd,'Share Document Source!',@opt.fns).green_hi_blue - : SiSU_Screen::Ansi.new(@opt.cmd,'Share Document Source!',@opt.fns).green_title_hi - SiSU_Screen::Ansi.new(@opt.cmd,"Copy sisu markup file to output directory","#{@opt.fno} -> #{@file.output_path.src.dir}").warn if @opt.cmd =~/[MVv]/ + ? SiSU_Screen::Ansi.new(@opt.cmd,'Share document markup text source',@opt.fns).cyan_hi_blue + : SiSU_Screen::Ansi.new(@opt.cmd,'Share document markup text source',@opt.fns).cyan_title_hi end if FileTest.directory?(@path_pod[:fnb]) FileUtils::mkdir_p(@file.output_path.src.dir) unless FileTest.directory?(@file.output_path.src.dir) v=(@opt.cmd =~/M/) ? 'v' : '' system(%{ rsync -a#{v} #{@path_pod[:fnb]} #{@file.output_path.sisupod.dir} + chbk=`pwd` cd #{@file.output_path.sisupod.dir} for I in `find -type d` ; do chmod 755 $I ; done for I in `find -type f` ; do chmod 644 $I ; done - cd - + cd ${chbk} }) else SiSU_Screen::Ansi.new('',"#{@opt.fno} not available").blue_tab if @opt.cmd=~/[MVv]/ |