From fed01af686fb007454eafff9127b16a6516b50c0 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sun, 17 Jun 2012 22:38:31 -0400 Subject: v3: shared_sisupod_source, common build for sisu (markup) source representations * to be used by sisupod.txz, git, (and src) * sisupod_make (--sisupod) * share_source (--source) NOTE not used git at present * changed representation of shared sisu source, include related files in directory rather than just markup file [reason for version bump] NOTE there are no changes to sisu markup (only the sharing of source files) --- lib/sisu/v3/git.rb | 50 ++++++++++++++++++++++++++------------------------ 1 file changed, 26 insertions(+), 24 deletions(-) (limited to 'lib/sisu/v3/git.rb') diff --git a/lib/sisu/v3/git.rb b/lib/sisu/v3/git.rb index 313b46a9..7c0d573a 100644 --- a/lib/sisu/v3/git.rb +++ b/lib/sisu/v3/git.rb @@ -86,15 +86,15 @@ module SiSU_Git lng=(@md.opt.lng) ? (@md.opt.lng) : (@md.i18n[0]) @git_path={ fnb: git_path_fnb, - src: git_path_fnb + '/' + Gt[:src] + '/' + lng, + doc: git_path_fnb + '/' + Gt[:sisupod] + '/' + Gt[:doc] + '/' + lng, po: git_path_fnb + '/' + Gt[:po] + '/' + lng, pot: git_path_fnb + '/' + Gt[:pot], - conf: git_path_fnb + '/' + Gt[:conf], - skin: git_path_fnb + '/' + Gt[:skin], - image: git_path_fnb + '/' + Gt[:image], - audio: git_path_fnb + '/' + Gt[:audio], - video: git_path_fnb + '/' + Gt[:video], - conf: git_path_fnb + '/' + Gt[:conf] + conf: git_path_fnb + '/' + Gt[:sisupod] + '/' + Gt[:conf], + skin: git_path_fnb + '/' + Gt[:sisupod] + '/' + Gt[:skin], + image: git_path_fnb + '/' + Gt[:sisupod] + '/' + Gt[:image], + audio: git_path_fnb + '/' + Gt[:sisupod] + '/' + Gt[:audio], + video: git_path_fnb + '/' + Gt[:sisupod] + '/' + Gt[:video], + conf: git_path_fnb + '/' + Gt[:sisupod] + '/' + Gt[:conf] } SiSU_DAL::Source.new(@opt).read # -m end @@ -107,9 +107,9 @@ module SiSU_Git def read create_file_structure_git populate.sisusrc_files - if program_found? - git_commit - end + #if program_found? + # git_commit + #end unless @opt.cmd =~/q/ @opt.cmd=~/[MVvz]/ \ ? SiSU_Screen::Ansi.new(@opt.cmd,'Git path',@git_path[:fnb]).green_hi_blue @@ -123,7 +123,7 @@ module SiSU_Git end def make_dir_fnb FileUtils::mkdir_p(@git_path[:fnb]) unless FileTest.directory?(@git_path[:fnb]) - FileUtils::mkdir_p(@git_path[:src]) unless FileTest.directory?(@git_path[:src]) + FileUtils::mkdir_p(@git_path[:doc]) unless FileTest.directory?(@git_path[:doc]) FileUtils::mkdir_p(@git_path[:po]) unless FileTest.directory?(@git_path[:po]) FileUtils::mkdir_p(@git_path[:pot]) unless FileTest.directory?(@git_path[:pot]) FileUtils::mkdir_p(@git_path[:conf]) unless FileTest.directory?(@git_path[:conf]) @@ -141,14 +141,16 @@ module SiSU_Git end end def git_commit - if FileTest.directory?("#{@git_path[:fnb]}") - pwd=Dir.pwd - Dir.chdir(@git_path[:fnb]) - system(" - git add . \ - && git commit -a - ") - Dir.chdir(pwd) + if program_found? + if FileTest.directory?("#{@git_path[:fnb]}") + pwd=Dir.pwd + Dir.chdir(@git_path[:fnb]) + system(" + git add . \ + && git commit -a + ") + Dir.chdir(pwd) + end end end def populate @@ -158,12 +160,12 @@ module SiSU_Git end def copy_src_head if @opt.f_pth[:lng] - FileUtils::cp_r("#{@env.path.pwd}/#{@opt.f_pth[:lng]}/#{@opt.fns}",@git_path[:src]) + FileUtils::cp_r("#{@env.path.pwd}/#{@opt.f_pth[:lng]}/#{@opt.fns}",@git_path[:doc]) elsif @opt.fns =~/\.ssm\.sst/ ssm=@opt.fns.gsub(/\.ssm\.sst/,'.ssm') - FileUtils::cp_r("#{@env.path.pwd}/#{ssm}",@git_path[:src]) + FileUtils::cp_r("#{@env.path.pwd}/#{ssm}",@git_path[:doc]) else - FileUtils::cp_r("#{@env.path.pwd}/#{@opt.fns}",@git_path[:src]) + FileUtils::cp_r("#{@env.path.pwd}/#{@opt.fns}",@git_path[:doc]) end end def copy_related_sst_ssi @@ -177,9 +179,9 @@ module SiSU_Git end doc_import.each do |f| if @opt.f_pth[:lng] - FileUtils::cp_r("#{@env.path.pwd}/#{@opt.f_pth[:lng]}/#{f}",@git_path[:src]) + FileUtils::cp_r("#{@env.path.pwd}/#{@opt.f_pth[:lng]}/#{f}",@git_path[:doc]) else - FileUtils::cp_r("#{@env.path.pwd}/#{f}",@git_path[:src]) + FileUtils::cp_r("#{@env.path.pwd}/#{f}",@git_path[:doc]) end end end -- cgit v1.2.3