From b09b60291c9d4e2d65ec85d980a4af0e41dd1d5d Mon Sep 17 00:00:00 2001 From: Patrick J Cherry Date: Mon, 18 Jul 2011 10:48:37 +0100 Subject: Moved version check for 1.8.7 later in the server code, such that it doesn't barf when generating manapges on vanilla etch. --- bin/mauveserver | 12 ++++++------ 1 file 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) -- cgit v1.2.1