From 3e3399388434e7f3339bbd230d16fc12fe5530f2 Mon Sep 17 00:00:00 2001 From: Brett Terpstra Date: Tue, 18 Mar 2014 07:26:41 -0500 Subject: [PATCH 1/2] Fix for empty flag when creating launchd file --- install.rb | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/install.rb b/install.rb index 89b4d12..b500b28 100755 --- a/install.rb +++ b/install.rb @@ -27,7 +27,7 @@ end if File.exists?(dir+"/slogger") - flags = "" + opts = [] puts "By default, Slogger runs once a day at 11:50PM." puts "If your computer is not always on, you can have" puts "Slogger fetch data back to the time of the last" @@ -36,7 +36,12 @@ puts "Is your Mac routinely offline at 11:50PM?" print "(Y/n)" ans = gets.chomp - flags += "-s" unless ans.downcase == "n" + opts.push("-s") unless ans.downcase == "n" + + flags = "" + opts.each {|flag| + flags += "\n\t\t#{flag}" + } print "Setting up launchd... " xml=<ProgramArguments /usr/bin/ruby - #{dir}/slogger - #{flags} + #{dir}/slogger#{flags} StartCalendarInterval From aaae2751ca3ade0042ccbf7b34eddc221eff7d8b Mon Sep 17 00:00:00 2001 From: Brett Terpstra Date: Tue, 18 Mar 2014 07:27:55 -0500 Subject: [PATCH 2/2] version bump for 2.1.0.11 release --- slogger | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slogger b/slogger index 568315a..bec7d3c 100755 --- a/slogger +++ b/slogger @@ -10,7 +10,7 @@ # -------------------- MAJOR_VERSION = 2.1 MINOR_VERSION = 0 -BUILD_NUMBER = 10 +BUILD_NUMBER = 11 init_env = ENV['SLOGGER_NO_INITIALIZE'].to_s ENV['SLOGGER_NO_INITIALIZE'] = "false"