summaryrefslogtreecommitdiff
path: root/launch_here.rb
blob: 95d383ba4f5300a5cd241db2c7dcd2bedf22b713 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/ruby
#
# Load rbot from this directory. (No need to install it with setup.rb)
#

SCM_DIR = File.expand_path File.dirname(__FILE__)
$0 = File.expand_path $0

Dir.chdir SCM_DIR

puts "Running from #{SCM_DIR}"

$:.unshift File.join(SCM_DIR, 'lib')

module Irc
class Bot
  module Config
    @@datadir = File.join SCM_DIR, 'data/rbot'
    @@coredir = File.join SCM_DIR, 'lib/rbot/core'
  end
end
end

load File.join(SCM_DIR, 'bin/rbot')