[archive] Deal with new 7z return codes

This commit is contained in:
Sebastian Schulze 2020-10-26 10:19:10 +01:00
parent 955ed3e745
commit 7f9ddbae83
Signed by: bascht
GPG Key ID: 5BCB1D3B4D38A35A
1 changed files with 1 additions and 1 deletions

2
bin/executable_archive Executable file → Normal file
View File

@ -9,5 +9,5 @@ source = Pathname.new(ARGV.join(" "))
target = File.join(source.dirname, (Time.now.strftime("%Y-%m-%d-") + source.basename.to_s + ".7z"))
system "7z a -t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on '#{target}' '#{source}'"
abort "Sorry, something went wrong" unless $?.eql? 0
abort "Sorry, something went wrong" unless $?.success?
FileUtils.rm_rf source