Skip to content
This repository has been archived by the owner on Oct 27, 2022. It is now read-only.

Commit

Permalink
Merge branch 'release/2.1.0.11'
Browse files Browse the repository at this point in the history
* release/2.1.0.11:
  version bump for 2.1.0.11 release
  Fix for empty flag when creating launchd file
  • Loading branch information
ttscoff committed Mar 18, 2014
2 parents 2fb2a64 + aaae275 commit bc491cb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
12 changes: 8 additions & 4 deletions install.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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<string>#{flag}</string>"
}

print "Setting up launchd... "
xml=<<LAUNCHCTLPLIST
Expand All @@ -49,8 +54,7 @@
<key>ProgramArguments</key>
<array>
<string>/usr/bin/ruby</string>
<string>#{dir}/slogger</string>
<string>#{flags}</string>
<string>#{dir}/slogger</string>#{flags}
</array>
<key>StartCalendarInterval</key>
<dict>
Expand Down
2 changes: 1 addition & 1 deletion slogger
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit bc491cb

Please sign in to comment.