aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/sisu/current/hub_options.rb18
1 files changed, 18 insertions, 0 deletions
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]')