diff options
Diffstat (limited to 'lib/sisu/v3/manifest.rb')
-rw-r--r-- | lib/sisu/v3/manifest.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/sisu/v3/manifest.rb b/lib/sisu/v3/manifest.rb index 20983d7f..446a8716 100644 --- a/lib/sisu/v3/manifest.rb +++ b/lib/sisu/v3/manifest.rb @@ -155,9 +155,9 @@ module SiSU_Manifest end def summarize_sources(id,file,pth,rel,url) sys=SiSU_Env::SystemCall.new - dgst =if @dg =~/^sha(?:2|256)$/; sys.sha256("#{pth}/#{file}") - else sys.md5("#{pth}/#{file}") - end + 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]/ size=(File.size("#{pth}/#{file}")/1024.00).to_s kb=/([0-9]+\.[0-9]{0,1})/m.match(size)[1] @@ -749,9 +749,9 @@ WOK and @md.lnk @md.lnk.each do |l| if defined? l[:say] - target=if l[:url] !~/^\.(\.)?\//; 'external' - else '_top' - end + target=(l[:url] !~/^\.(\.)?\//) \ + ? 'external' + : '_top' url,lnk=l[:url],l[:say] unless url.nil? \ or url.empty? |