def Utils.checksum(file_path)
if File.exist? file_path then
- return execute_shell_return("shasum -a 256 \"#{file_path}\"")[0].split(" ")[0]
+ return execute_shell_return("shasum -a 256 \"#{file_path}\"").last.split(" ").first
else
return nil
end
logger.info "Downloading #{url}"
if is_remote then
if logger.path.nil? or logger.path.empty? then
- ret = system "wget #{url} -O #{fullpath} -nv --tries=3 --connect-timeout=10"
- else
- pid,status = Utils.execute_shell_with_log( "wget #{url} -O #{fullpath} -nv --tries=3 --connect-timeout=10", logger.path )
+ ret = system "wget --no-cache #{url} -O #{fullpath} -nv --tries=3 --connect-timeout=10"
+ else
+ pid,status = Utils.execute_shell_with_log( "wget --no-cache #{url} -O #{fullpath} -nv --tries=3 --connect-timeout=10", logger.path )
if not status.nil? then
ret = (status.exitstatus != 0) ? false : true
end
- end
+ end
else
if not File.exist? url then
logger.error "\"#{url}\" file does not exist"