From fe11699daa7fb163fbcae00255f031719d50a38c Mon Sep 17 00:00:00 2001 From: Alexander Beisig Date: Mon, 17 Jul 2006 20:22:51 +0000 Subject: Changes that will (hopefully) make rbot work directly from the SVN checkout --- bin/rbot | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'bin') diff --git a/bin/rbot b/bin/rbot index bbe2c9ea..37ef427c 100755 --- a/bin/rbot +++ b/bin/rbot @@ -27,7 +27,7 @@ require 'etc' require 'getoptlong' require 'fileutils' -$version="0.9.9" +$version="0.9.10" $opts = Hash.new orig_opts = ARGV.dup @@ -53,10 +53,18 @@ if ($opts["trace"]) } end +defaultlib = File.expand_path(File.dirname($0) + '/../lib') + +if File.directory? "#{defaultlib}/rbot" + unless $:.include? defaultlib + $:.push defaultlib + end +end + begin require 'rbot/ircbot' rescue LoadError => e - puts "Error: couldn't find the rbot/ircbot module (or one of its dependencies)\n - did you install rbot using setup.rb?" + puts "Error: couldn't find the rbot/ircbot module (or one of its dependencies)\n" puts e exit 2 end -- cgit v1.2.3