Added support for system configured maps.

This commit is contained in:
Glenn Y. Rolland 2011-07-31 23:23:37 +02:00
parent 27d12b4cd0
commit 16f524699f
2 changed files with 3 additions and 1 deletions

View file

@ -8,6 +8,7 @@ require 'find'
require 'rubygems' require 'rubygems'
require 'rdebug/base' require 'rdebug/base'
require 'qasim/constants'
require 'qasim/map' require 'qasim/map'
module Qasim module Qasim
@ -53,7 +54,7 @@ module Qasim
rdebug "Config: #{@config_dir}/config" rdebug "Config: #{@config_dir}/config"
@maps = [] @maps = []
Find.find( @config_dir ) do |path| Find.find( @config_dir, APP_SYSCONFIG_DIR ) do |path|
if File.file? path if File.file? path
if File.basename( path ) =~ /.map$/ if File.basename( path ) =~ /.map$/
begin begin

View file

@ -1,5 +1,6 @@
module Qasim module Qasim
APP_ICON_PATH = File.join QASIM_INCLUDE_DIR, "icons" APP_ICON_PATH = File.join QASIM_INCLUDE_DIR, "icons"
APP_SYSCONFIG_DIR = "/etc/qasim/maps.d"
APP_NAME = "Qasim" APP_NAME = "Qasim"
APP_VERSION = "0.1" APP_VERSION = "0.1"
end end