]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - launch_here.rb
hl2 plugin: improve help
[user/henk/code/ruby/rbot.git] / launch_here.rb
index 033e075fd14729518811b2bbaf2d5c4d6fa0ad94..95d383ba4f5300a5cd241db2c7dcd2bedf22b713 100755 (executable)
@@ -3,18 +3,22 @@
 # Load rbot from this directory. (No need to install it with setup.rb)
 #
 
-SVN_DIR = File.expand_path(File.dirname('__FILE__'))
-puts "Running from #{SVN_DIR}"
+SCM_DIR = File.expand_path File.dirname(__FILE__)
+$0 = File.expand_path $0
 
-$:.unshift File.join(SVN_DIR, 'lib')
+Dir.chdir SCM_DIR
+
+puts "Running from #{SCM_DIR}"
+
+$:.unshift File.join(SCM_DIR, 'lib')
 
 module Irc
 class Bot
   module Config
-    @@datadir = File.join SVN_DIR, 'data/rbot'
-    @@coredir = File.join SVN_DIR, 'lib/rbot/core'
+    @@datadir = File.join SCM_DIR, 'data/rbot'
+    @@coredir = File.join SCM_DIR, 'lib/rbot/core'
   end
 end
 end
 
-load File.join(SVN_DIR, 'bin/rbot')
+load File.join(SCM_DIR, 'bin/rbot')