aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v4
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2013-03-18 00:14:43 -0400
committerRalph Amissah <ralph@amissah.com>2013-03-18 00:14:43 -0400
commita70059df3e903c5533c3a35b0508c0e8da1e07de (patch)
treea2697a79a0dbc4f6f91ea003cf7827c791a03e6a /lib/sisu/v4
parentdebian/changelog (4.0.14-1) (diff)
parentv4: share document source, markup text file &/or sisupod (diff)
Merge tag 'sisu_4.0.15' into debian/sid
SiSU 4.0.15
Diffstat (limited to 'lib/sisu/v4')
-rw-r--r--lib/sisu/v4/hub.rb9
-rw-r--r--lib/sisu/v4/screen_text_color.rb3
-rw-r--r--lib/sisu/v4/share_src.rb9
-rw-r--r--lib/sisu/v4/sisupod_make.rb8
4 files changed, 16 insertions, 13 deletions
diff --git a/lib/sisu/v4/hub.rb b/lib/sisu/v4/hub.rb
index f7cdb1e2..ba36c9ad 100644
--- a/lib/sisu/v4/hub.rb
+++ b/lib/sisu/v4/hub.rb
@@ -359,10 +359,6 @@ module SiSU
require_relative 'dbi_discrete' # -d dbi_discrete.rb
SiSU_DBI_Discrete::SQL.new(@opt).build
end
- if @opt.act[:manifest][:set]==:on #% --manifest, -y
- require_relative 'manifest' # -y manifest.rb
- SiSU_Manifest::Source.new(@opt).read
- end
end
end
def loop_files_on_given_option_pre_do
@@ -417,11 +413,14 @@ module SiSU
end
end
end
+ if @opt.act[:manifest][:set]==:on #% --manifest, -y
+ require_relative 'manifest' # -y manifest.rb
+ SiSU_Manifest::Source.new(@opt).read
+ end
ensure
path_pod=@env.processing_path.processing_sisupod(@opt).paths
unless @opt.cmd =~/M/
FileUtils::rm_rf("#{path_pod[:sisupod]}/*") if FileTest.directory?(path_pod[:sisupod])
- #FileUtils::rm_rf("#{path_pod[:fnb]}/*") if FileTest.directory?(path_pod[:fnb])
end
end
end
diff --git a/lib/sisu/v4/screen_text_color.rb b/lib/sisu/v4/screen_text_color.rb
index c2678ba7..06307154 100644
--- a/lib/sisu/v4/screen_text_color.rb
+++ b/lib/sisu/v4/screen_text_color.rb
@@ -349,6 +349,9 @@ module SiSU_Screen
def cyan_title_hi
puts %{#{@cX.cyan_hi}#{@cX.black}#{@txt[0]}#{@cX.off*2} #{@cX.blue}#{@txt[1]}#{@cX.off}}
end
+ def cyan_hi_blue
+ puts %{#{@cX.cyan_hi}#{@cX.black}#{@txt[0]}#{@cX.off*2} #{@cX.blue}#{@txt[1]}#{@cX.off}}
+ end
def dbi_title
puts %{#{@cX.blue_hi}#{@cX.black}#{@txt[0]}#{@cX.off*2} #{@cX.cyan}#{@cX.grey}#{@txt[1]}#{@cX.off*2} #{@cX.green}#{@txt[2]}#{@cX.off}}
end
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]/
diff --git a/lib/sisu/v4/sisupod_make.rb b/lib/sisu/v4/sisupod_make.rb
index 99103554..57c12049 100644
--- a/lib/sisu/v4/sisupod_make.rb
+++ b/lib/sisu/v4/sisupod_make.rb
@@ -69,9 +69,11 @@ module SiSU_Doc
def initialize(opt,build=nil,place=nil)
super(opt,build,place)
@zipfile=@opt.fno.gsub(/(?:\~\S{2,3})?(\.ss[tm])$/,'\1')
- @ans=SiSU_Response::Response.new
- if @opt.cmd=~/[MVv]/
- SiSU_Screen::Ansi.new(@opt.cmd,'Assemble source for sisu document',"#{@opt.fns} -> file://#{@file.output_path.sisupod.dir}/#{@zipfile}.txz").warn
+ unless @opt.cmd =~/q/
+ pthinfo="#{@file.output_path.sisupod.dir}/#{@zipfile}.txz"
+ @opt.cmd=~/[MVv]/ \
+ ? SiSU_Screen::Ansi.new(@opt.cmd,'Assemble source for sisu document',"#{@opt.fns} -> file://#{pthinfo}").cyan_hi_blue
+ : SiSU_Screen::Ansi.new(@opt.cmd,'Assemble source for sisu document',pthinfo).cyan_title_hi
end
end
def sisupod_tar_xz