Attempt to lower complexity of unpack function

parent 72940687
...@@ -156,14 +156,13 @@ module Backup ...@@ -156,14 +156,13 @@ module Backup
tar_file = backup_file_list.first tar_file = backup_file_list.first
end end
progress.print 'Unpacking backup ... ' progress.print 'Unpacking backup ... '
if Kernel.system(*%W(tar -xf #{tar_file})) if Kernel.system(*%W(tar -xf #{tar_file}))
progress.puts 'done'.color(:green) progress.puts 'done'.color(:green)
else else
progress.puts 'unpacking backup failed'.color(:red) progress.puts 'unpacking backup failed'.color(:red)
exit 1 exit 1
end
end end
end end
true true
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment