diff options
author | Ralph Amissah <ralph@amissah.com> | 2007-09-29 17:20:46 +0100 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2007-09-29 17:20:46 +0100 |
commit | d71ead0c09c8d2951d9bacd49e5cd0a68d2e7a2d (patch) | |
tree | e8308df595c744bb678077b2bde7f4d95464222a /lib | |
parent | man2html regenerated (diff) |
hash test now will return only filename, no path, man page and man2html update
Diffstat (limited to 'lib')
-rw-r--r-- | lib/sisu/v0/sysenv.rb | 9 |
1 files changed, 7 insertions, 2 deletions
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 |