bin/populus in populus-0.0.1.pre3 vs bin/populus in populus-0.0.1

- old
+ new

@@ -1,17 +1,21 @@ #!/usr/bin/env ruby # -*- mode: ruby -*- require 'populus' -mode = ARGV[0] # This is for forward compatibility -if mode != 'accept' - puts "Unknown arg: #{mode}" +mode = ARGV[0] +setting = ARGV[1] + +case mode +when 'accept' + # FIXME: implement one-time runner + Populus.logger.error "FIXME: implement one-time runner" exit 127 +when 'watch' + Populus::Daemon.run(setting: setting) +else + Populus.logger.error "Unknown arg: #{mode}" + exit 127 end -setting = ARGV[1] - -Populus.eval_setting setting - -data = STDIN.read -Populus::Do.accept data +exit 0