]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
this packaging stuff seems to actually be working
authorTom Gilbert <tom@linuxbrit.co.uk>
Wed, 27 Jul 2005 17:56:26 +0000 (17:56 +0000)
committerTom Gilbert <tom@linuxbrit.co.uk>
Wed, 27 Jul 2005 17:56:26 +0000 (17:56 +0000)
lib/rbot/config.rb
lib/rbot/ircbot.rb
lib/rbot/plugins.rb
lib/rbot/post-config.rb

index a193e8c38e652025a904cbf42dd9c582cabe16a7..e881774f7cff9e381b283fdf6514fbe0f9d43645 100644 (file)
@@ -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
         },
index 89746af36c547be40f3786807ba60cd584807fcb..e211ca5309703ad9c61c84acddc43b310e2af099 100644 (file)
@@ -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"))
index 9f88d0c3ea1bb4caa86c31037fd69c80329d5106..1a66b7d3250ef4fe120a7daa4b1f888818368b74 100644 (file)
@@ -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))
index 974ebd0ed3bdb952af99c68f44388a94ca014056..182cdfce7cc4c001dd42e249c938b6bece582748 100644 (file)
@@ -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"
 }