diff options
Diffstat (limited to 'lognotify.rb')
-rwxr-xr-x | lognotify.rb | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/lognotify.rb b/lognotify.rb index 4c5c494..30875a0 100755 --- a/lognotify.rb +++ b/lognotify.rb @@ -65,10 +65,7 @@ STDOUT.sync = true # Create cache directory, if nonexistent. path = File.expand_path(CACHE_DIR) -unless File.directory?(path) - File.makedirs(path) - puts 'Done' -end +File.makedirs(path) unless File.directory?(path) # Treat each argument as a log identifier. ARGV.each do |identifier| @@ -76,10 +73,7 @@ ARGV.each do |identifier| # Create cache file, if nonexistent. path = File.expand_path(CACHE_DIR + '/' + identifier + '.log') - unless File.exist?(path) - File.open(path, 'w').close - puts 'Done' - end + File.open(path, 'w').close unless File.exist?(path) print '* Counting lines in cached log... ' lines = count_lines(identifier) |