summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Gilbert <tom@linuxbrit.co.uk>2005-07-27 17:56:26 +0000
committerTom Gilbert <tom@linuxbrit.co.uk>2005-07-27 17:56:26 +0000
commitb277145b3f70e8a29dc1445724539b03d90fa108 (patch)
tree196349bf6ec77ccce7d6d72ca96b012fe122eef7
parent39b8ac0ed06c32aa72142acda04a27b8404f5560 (diff)
this packaging stuff seems to actually be working
-rw-r--r--lib/rbot/config.rb2
-rw-r--r--lib/rbot/ircbot.rb6
-rw-r--r--lib/rbot/plugins.rb2
-rw-r--r--lib/rbot/post-config.rb2
4 files changed, 6 insertions, 6 deletions
diff --git a/lib/rbot/config.rb b/lib/rbot/config.rb
index a193e8c3..e881774f 100644
--- a/lib/rbot/config.rb
+++ b/lib/rbot/config.rb
@@ -143,7 +143,7 @@ module Irc
:prompt => "Language",
:key => "core.language",
:type => :enum,
- :items => Dir.new(CONFIG::DATADIR + "/languages").collect {|f|
+ :items => Dir.new(Config::DATADIR + "/languages").collect {|f|
f =~ /\.lang$/ ? f.gsub(/\.lang$/, "") : nil
}.compact
},
diff --git a/lib/rbot/ircbot.rb b/lib/rbot/ircbot.rb
index 89746af3..e211ca53 100644
--- a/lib/rbot/ircbot.rb
+++ b/lib/rbot/ircbot.rb
@@ -80,8 +80,8 @@ class IrcBot
# create a new IrcBot with botclass +botclass+
def initialize(botclass)
- unless Config::DATA_DIR && FileTest.directory? Config::DATA_DIR
- puts "no data directory '#{Config::DATA_DIR}' found, did you run install.rb?"
+ unless FileTest.directory? Config::DATADIR
+ puts "no data directory '#{Config::DATADIR}' found, did you run install.rb?"
exit 2
end
@@ -94,7 +94,7 @@ class IrcBot
puts "Error: file #{botclass} exists but isn't a directory"
exit 2
end
- FileUtils.cp_r Config::DATA_DIR+'/templates', botclass
+ FileUtils.cp_r Config::DATADIR+'/templates', botclass
end
Dir.mkdir("#{botclass}/logs") if(!File.exist?("#{botclass}/logs"))
diff --git a/lib/rbot/plugins.rb b/lib/rbot/plugins.rb
index 9f88d0c3..1a66b7d3 100644
--- a/lib/rbot/plugins.rb
+++ b/lib/rbot/plugins.rb
@@ -170,7 +170,7 @@ module Irc
# load plugins from pre-assigned list of directories
def scan
dirs = Array.new
- dirs << CONFIG::DATADIR + "/plugins"
+ dirs << Config::DATADIR + "/plugins"
dirs += @dirs
dirs.each {|dir|
if(FileTest.directory?(dir))
diff --git a/lib/rbot/post-config.rb b/lib/rbot/post-config.rb
index 974ebd0e..182cdfce 100644
--- a/lib/rbot/post-config.rb
+++ b/lib/rbot/post-config.rb
@@ -2,7 +2,7 @@
File.open('rbotconfig.rb', "w") {|f|
f.puts "module Irc"
f.puts " module Config"
- f.puts " DATADIR = '#{config('datadir')}'"
+ f.puts " DATADIR = '#{config('datadir')}/rbot'"
f.puts " end"
f.puts "end"
}