diff --git a/trunk/ripnews/ripnews.rb b/trunk/ripnews/ripnews.rb index 63df641..60e2973 100755 --- a/trunk/ripnews/ripnews.rb +++ b/trunk/ripnews/ripnews.rb @@ -1,6 +1,6 @@ #!/usr/local/bin/ruby -w -# $Dwarf: ripnews.rb,v 1.49 2003/04/20 21:09:00 ward Exp $ +# $Dwarf: ripnews.rb,v 1.50 2003/04/22 21:30:06 ward Exp $ # $Source$ require 'date' @@ -116,8 +116,12 @@ def usage end def parse_config(default = {}) - file = File.new("#{default[\"-c\"]}") - lines = file.readlines + if FileTest.readable?("#{default[\"-c\"]}") + file = File.new("#{default[\"-c\"]}") + lines = file.readlines + else + lines = [] + end i = 0 group = "" @@ -207,6 +211,10 @@ def parse_config(default = {}) end def check_config + if @config.length == 0 + print "No configuration, nothing to do\n" + exit + end @config.each_key {|i| unless @config[i].has_key?("-I") print "No inclusions given for group #{i}. Won't match anything.\n"