LogAn/bin/loganinc

22 lines
306 B
Plaintext
Raw Normal View History

#!/usr/bin/ruby
2010-03-29 11:50:59 +02:00
require 'logan'
require 'logan/inc'
2010-03-29 11:50:59 +02:00
opts = {}
opts[:server] = if ARGV[1]
ARGV
elsif ARGV[0]
['localhost', ARGV[1]]
else %w[localhost 1087]
end
2010-03-29 11:50:59 +02:00
opts[:server][1] = opts[:server][1].to_i
2010-03-29 19:16:27 +02:00
logan = LogAn::Inc::Main.new *opts
begin
logan.main
rescue Object
logan.at_exit
raise $!
end