diff options
Diffstat (limited to 'lib/sisu/v6/manifest.rb')
-rw-r--r-- | lib/sisu/v6/manifest.rb | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/sisu/v6/manifest.rb b/lib/sisu/v6/manifest.rb index 1d6bc6a9..27b90eda 100644 --- a/lib/sisu/v6/manifest.rb +++ b/lib/sisu/v6/manifest.rb @@ -123,7 +123,7 @@ module SiSU_Manifest ? './image' : %{#{@f.path_rel_links.html_scroll_2}_sisu/image_sys} @base_path=@f.output_path.manifest.dir - @@dg ||=SiSU_Env::InfoEnv.new.digest.type + @@dg ||=SiSU_Env::InfoEnv.new(md.fns,md).digest(md.opt).type @dg=@@dg l=SiSU_Env::StandardiseLanguage.new(md.opt.lng).language @language=l[:n] @@ -165,9 +165,15 @@ module SiSU_Manifest end def summarize_sources(id,file,pth,rel,url) sys=SiSU_Env::SystemCall.new - dgst=(@dg =~/^sha(?:2|256)$/) \ - ? sys.sha256("#{pth}/#{file}") - : sys.md5("#{pth}/#{file}") + dgst=case @dg + when :sha512 + sys.sha512("#{pth}/#{file}") + when :sha256 + sys.sha256("#{pth}/#{file}") + when :md5 + sys.md5("#{pth}/#{file}") + else + end if (@md.opt.act[:verbose][:set]==:on \ || @md.opt.act[:verbose_plus][:set]==:on \ || @md.opt.act[:maintenance][:set]==:on) |