From d71ead0c09c8d2951d9bacd49e5cd0a68d2e7a2d Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sat, 29 Sep 2007 17:20:46 +0100 Subject: hash test now will return only filename, no path, man page and man2html update --- lib/sisu/v0/sysenv.rb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'lib/sisu/v0/sysenv.rb') diff --git a/lib/sisu/v0/sysenv.rb b/lib/sisu/v0/sysenv.rb index 8bf805be..329c9111 100644 --- a/lib/sisu/v0/sysenv.rb +++ b/lib/sisu/v0/sysenv.rb @@ -536,7 +536,10 @@ module SiSU_Env program='openssl' program_ref="\n\t\tmd5 digest requested" if program_found?(program) - dgst=%x{openssl dgst -md5 #{filename}}.strip + pwd=Dir.pwd + Dir.chdir(File.dirname(filename)) + dgst=%x{openssl dgst -md5 #{File.basename(filename)}}.strip #use file name without file path + Dir.chdir(pwd) dgst.scan(/\S+/) else puts "\tWARN: #{program} is not installed #{program_ref}" #if @cmd =~/v/ false @@ -546,7 +549,9 @@ module SiSU_Env program='openssl' program_ref="\n\t\tsha digest requested" if program_found?(program) - dgst=%x{openssl dgst -sha256 #{filename}}.strip + Dir.chdir(File.dirname(filename)) + dgst=%x{openssl dgst -sha256 #{File.basename(filename)}}.strip #use file name without file path + Dir.chdir(pwd) dgst.scan(/\S+/) else puts "\tWARN: #{program} is not installed #{program_ref}" #if @cmd =~/v/ false -- cgit v1.2.3