diff options
author | Patrick J Cherry <patrick@bytemark.co.uk> | 2011-07-18 10:48:37 +0100 |
---|---|---|
committer | Patrick J Cherry <patrick@bytemark.co.uk> | 2011-07-18 10:48:37 +0100 |
commit | b09b60291c9d4e2d65ec85d980a4af0e41dd1d5d (patch) | |
tree | fbda1ff05050a44544bb4faaf71adb6db9480929 | |
parent | a3e3231b5dc24fd2dd6ed867f9364705117a2261 (diff) |
Moved version check for 1.8.7 later in the server code, such that it doesn't
barf when generating manapges on vanilla etch.
-rwxr-xr-x | bin/mauveserver | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/bin/mauveserver b/bin/mauveserver index 9d1cf53..aea9d8c 100755 --- a/bin/mauveserver +++ b/bin/mauveserver @@ -30,12 +30,6 @@ def error(msg) exit 1 end -begin - eval "Proc.new { |a,&b| }" -rescue SyntaxError => no_blocks_with_procs - error "mauveserver must have Ruby 1.8.7 or later" -end - help = ARGV.any?{|a| a =~ /-(h|-help)/} version = ARGV.any?{|a| a =~ /-(V|-version)/} manual = ARGV.any?{|a| a =~ /-(m|-manual)/} @@ -71,6 +65,12 @@ puts "#{$0}: version "+Mauve::VERSION if version exit 0 if help or version or manual +begin + eval "Proc.new { |a,&b| }" +rescue SyntaxError => no_blocks_with_procs + error "mauveserver must have Ruby 1.8.7 or later." +end + configuration_file = ARGV.shift configuration_file = [".", "/etc/mauvealert/"].collect{|x| File.join("mauveserver.conf") }.find{|d| File.file?(d)} if configuration_file.nil? configuration_file = File.expand_path(configuration_file) |