summaryrefslogtreecommitdiffstats
path: root/lib/sisu/v5/manifest.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2013-10-24 03:40:45 +0000
committerRalph Amissah <ralph@amissah.com>2013-10-24 03:40:45 +0000
commitedd89902036bde18c91031470e19c871a182cf6d (patch)
tree1269e7b1660aa64896fc21768002e837233c2c24 /lib/sisu/v5/manifest.rb
parentv4 v5: version & changelog (diff)
downloadsisu-edd89902036bde18c91031470e19c871a182cf6d.zip
sisu-edd89902036bde18c91031470e19c871a182cf6d.tar.xz
v5: options & downstream, more use of opt.act instead of opt.cmd
* opt.act.*.set==:on instead of opt.cmd =~/\S/
Diffstat (limited to 'lib/sisu/v5/manifest.rb')
-rw-r--r--lib/sisu/v5/manifest.rb21
1 files changed, 15 insertions, 6 deletions
diff --git a/lib/sisu/v5/manifest.rb b/lib/sisu/v5/manifest.rb
index a8e6bb2..071959c 100644
--- a/lib/sisu/v5/manifest.rb
+++ b/lib/sisu/v5/manifest.rb
@@ -86,12 +86,17 @@ module SiSU_Manifest
xbrowser=@env.program.web_browser
browser=@env.program.console_web_browser
# webserv_url=@env.path.url.output_tell #fix in sysenv
- unless @opt.cmd =~/q/
+ unless @opt.act[:quiet][:set]==:on
url_html="file://#{@md.file.output_path.manifest.dir}/#{@md.file.base_filename.manifest}"
- @opt.cmd=~/[MVvz]/ \
- ? SiSU_Screen::Ansi.new(@opt.cmd,'Manifest',"#{xbrowser} #{url_html}").green_hi_blue
- : SiSU_Screen::Ansi.new(@opt.cmd,'Manifest',"[#{@opt.f_pth[:lng_is]}]", "#{url_html}").grey_title_grey_blue
- SiSU_Screen::Ansi.new(@opt.cmd,"#{browser} #{url_html}").grey_tab if @opt.cmd =~/v/i
+ (@opt.act[:verbose][:set]==:on \
+ || @opt.act[:verbose_plus][:set]==:on \
+ || @opt.act[:maintenance][:set]==:on) \
+ ? SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'Manifest',"#{xbrowser} #{url_html}").green_hi_blue
+ : SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'Manifest',"[#{@opt.f_pth[:lng_is]}]", "#{url_html}").grey_title_grey_blue
+ if (@md.opt.act[:verbose][:set]==:on \
+ || @md.opt.act[:verbose_plus][:set]==:on)
+ SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],"#{browser} #{url_html}").grey_tab
+ end
end
data=SiSU_HTML::Source::HTML_Environment.new(@particulars).tuned_file_instructions
SiSU_Manifest::Source::Output.new(@md).check_output(data)
@@ -162,7 +167,11 @@ module SiSU_Manifest
dgst=(@dg =~/^sha(?:2|256)$/) \
? sys.sha256("#{pth}/#{file}")
: sys.md5("#{pth}/#{file}")
- SiSU_Screen::Ansi.new(@md.opt.cmd,"#{dgst[1]} #{file}").warn if @md.opt.cmd =~/[vVM]/
+ if (@md.opt.act[:verbose][:set]==:on \
+ || @md.opt.act[:verbose_plus][:set]==:on \
+ || @md.opt.act[:maintenance][:set]==:on)
+ SiSU_Screen::Ansi.new(@md.opt.act[:color_state][:set],"#{dgst[1]} #{file}").warn
+ end
size=(File.size("#{pth}/#{file}")/1024.00).to_s
kb=/([0-9]+\.[0-9]{0,1})/m.match(size)[1]
@manifest[:txt] << "#{file} #{id} #{kb}\n"