Fix logging messages
This commit is contained in:
parent
696a71bd8b
commit
1e53f004f7
@ -109,7 +109,7 @@ OptionParser.new do |parser|
|
|||||||
parser.on('-b', '--backup [FILENAME]', "Backup Discord Installation") do |backup_filename|
|
parser.on('-b', '--backup [FILENAME]', "Backup Discord Installation") do |backup_filename|
|
||||||
$CONFIG[:action] = 'backup'
|
$CONFIG[:action] = 'backup'
|
||||||
if backup_filename.nil?
|
if backup_filename.nil?
|
||||||
$CONFIG[:backup_filename] = 'discord-backup-' + Time.now.strftime('%Y-%m-%d') + '.tar.gz'
|
$CONFIG[:backup_filename] = Dir.home / 'discord-backup-' + Time.now.strftime('%Y-%m-%d') + '.tar.gz'
|
||||||
else
|
else
|
||||||
$CONFIG[:backup_filename] = backup_filename + ".tar.gz"
|
$CONFIG[:backup_filename] = backup_filename + ".tar.gz"
|
||||||
end
|
end
|
||||||
@ -258,7 +258,7 @@ def make_backup
|
|||||||
end
|
end
|
||||||
|
|
||||||
Dir.chdir(Dir.home) do
|
Dir.chdir(Dir.home) do
|
||||||
puts "make_backup: Beginning backup process (OUTPUT_FILE = #{Dir.getwd/$CONFIG[:backup_filename]})"
|
puts "make_backup: Beginning backup process (OUTPUT_FILE = #{$CONFIG[:backup_filename]})"
|
||||||
File.open($CONFIG[:backup_filename], "wb") do |backup_file|
|
File.open($CONFIG[:backup_filename], "wb") do |backup_file|
|
||||||
Zlib::GzipWriter.wrap(backup_file) do |gzip|
|
Zlib::GzipWriter.wrap(backup_file) do |gzip|
|
||||||
Gem::Package::TarWriter.new(gzip) do |tar|
|
Gem::Package::TarWriter.new(gzip) do |tar|
|
||||||
|
Loading…
Reference in New Issue
Block a user