From b2ff4e775f95e5121246fb1e7e95500a1b95cb38 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 21 Apr 2015 13:19:55 -0400 Subject: c: hub options, fix --- lib/sisu/current/hub_options.rb | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/lib/sisu/current/hub_options.rb b/lib/sisu/current/hub_options.rb index 35398758..8a9af156 100644 --- a/lib/sisu/current/hub_options.rb +++ b/lib/sisu/current/hub_options.rb @@ -178,9 +178,27 @@ module SiSU_Commandline def sisu_run_from? @sisu_run_from end + def sisu_bin_filepath? + @sisu_run_from + end def sisu_install_type? @sisu_install_type end + def sisu_data_dir? + env=RbConfig::CONFIG + if sisu_install_type? ==:full_path_to_sisu_bin_in_sisu_dir_tree + sisu_bin_filepath?.gsub(/\/bin\/sisu\S*/,'/data/sisu') + #sisu_lib_dir?.gsub(/\/lib\/sisu\/(?:current|develop)\S*/,'/data/sisu') + elsif sisu_install_type? ==:gem_install + #sisu_run_from?.gsub(/\/bin\/.+/,'/data/sisu') + env['datadir'] + elsif sisu_install_type? ==:system_install + #SiSU_Info_Env::InfoEnv.new.path.share + env['datadir'] + else + env['datadir'] + end + end def find_all(find_flag,opt) if find_flag x=Dir.glob('*.ss[tm]') -- cgit v1.2.3