4 # setup pkg-based configuration - i.e. where were we installed to, where
5 # are our data files, etc.
8 gemname, gem = Gem.source_index.find{|name, spec| spec.name == 'rbot' && spec.version.version == $version}
9 if gem && path = gem.full_gem_path
10 debug "installed via rubygems to #{path}"
11 @@datadir = "#{path}/data/rbot"
13 debug "not installed via rubygems"
16 debug "no rubygems installed"
21 require 'rbot/pkgconfig'
22 @@datadir = PKGConfig::DATADIR
24 puts "fatal - no way to determine data dir"