diff options
author | Chris Gahan <chris@ill-logic.com> | 2006-08-04 06:34:44 +0000 |
---|---|---|
committer | Chris Gahan <chris@ill-logic.com> | 2006-08-04 06:34:44 +0000 |
commit | 07fa0d9565f373feca3774c60fc645c96ac81652 (patch) | |
tree | 36bea31816475c1710ccb57c2ad9976453ad9f5f | |
parent | f1c6f0ba07e5abcd980f1e12e8823ce865bfeeed (diff) |
A little handy script that launches the rbot daemon from this directory (no need to install it!)
-rwxr-xr-x | launch_here.rb | 27 | ||||
-rw-r--r-- | lib/rbot/rbotconfig.rb | 2 |
2 files changed, 28 insertions, 1 deletions
diff --git a/launch_here.rb b/launch_here.rb new file mode 100755 index 00000000..2e7161db --- /dev/null +++ b/launch_here.rb @@ -0,0 +1,27 @@ +#!/usr/bin/ruby
+#
+# Load rbot from this directory. (No need to install it with setup.rb)
+#
+
+BASEDIR = Dir.pwd
+
+#puts "Load path: #{$LOAD_PATH.inspect}"
+ +def add_to_path(dir) + $LOAD_PATH.unshift dir +end +
+module Irc + module PKGConfig + DATADIR = File.join BASEDIR, 'data/rbot' + COREDIR = File.join BASEDIR, 'lib/rbot/core' + end +end
+
+add_to_path( File.join BASEDIR, 'lib' )
+
+p ARGV
+ARGV << "--debug"
+p ARGV
+ +load( File.join BASEDIR, 'bin/rbot' ) diff --git a/lib/rbot/rbotconfig.rb b/lib/rbot/rbotconfig.rb index 32bd66d4..409ab9f8 100644 --- a/lib/rbot/rbotconfig.rb +++ b/lib/rbot/rbotconfig.rb @@ -32,7 +32,7 @@ module Irc if gem && path = gem.full_gem_path debug "installed via rubygems to #{path}" @@datadir = "#{path}/data/rbot" - @@datadir = "#{path}/lib/rbot/core" + @@coredir = "#{path}/lib/rbot/core" else debug "not installed via rubygems" end |