aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v3/sisupod_make.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v3/sisupod_make.rb')
-rw-r--r--lib/sisu/v3/sisupod_make.rb21
1 files changed, 17 insertions, 4 deletions
diff --git a/lib/sisu/v3/sisupod_make.rb b/lib/sisu/v3/sisupod_make.rb
index f438687f..33ae8db2 100644
--- a/lib/sisu/v3/sisupod_make.rb
+++ b/lib/sisu/v3/sisupod_make.rb
@@ -272,9 +272,22 @@ module SiSU_Doc
x[:f].each do |f|
pth="#{@env.processing_path.processing_sisupod(@opt)}/doc/#{@opt.lng}"
FileUtils::mkdir_p(pth) unless FileTest.directory?(pth)
- (@opt.fno =~/\.ssm$/) \
- ? FileUtils::cp_r("#{@env.path.pwd}#{doc_import_dir}/#{f[:f]}","#{@env.processing_path.processing_sisupod(@opt)}/doc/#{@opt.lng}/#{f[:n]}")
- : FileUtils::cp_r("#{@env.path.pwd}/#{f[:f]}","#{@env.processing_path.processing_sisupod(@opt)}/doc/#{@opt.lng}/#{f[:n]}")
+ if f[:f] =~/\~(\S{2,3})\.ss[tm]$/
+ lng_f=$1
+ if @opt.lng == lng_f
+ (@opt.fno =~/\.ssm$/) \
+ ? FileUtils::cp_r("#{@env.path.pwd}#{doc_import_dir}/#{f[:f]}",
+ "#{@env.processing_path.processing_sisupod(@opt)}/doc/#{@opt.lng}/#{f[:n]}")
+ : FileUtils::cp_r("#{@env.path.pwd}/#{f[:f]}",
+ "#{@env.processing_path.processing_sisupod(@opt)}/doc/#{@opt.lng}/#{f[:n]}")
+ end
+ else
+ (@opt.fno =~/\.ssm$/) \
+ ? FileUtils::cp_r("#{@env.path.pwd}#{doc_import_dir}/#{f[:f]}",
+ "#{@env.processing_path.processing_sisupod(@opt)}/doc/#{@opt.lng}/#{f[:n]}")
+ : FileUtils::cp_r("#{@env.path.pwd}/#{f[:f]}",
+ "#{@env.processing_path.processing_sisupod(@opt)}/doc/#{@opt.lng}/#{f[:n]}")
+ end
end
end #NB not all possibilies met, revisit, also in case of composite file may wish to add README
end
@@ -302,7 +315,7 @@ module SiSU_Doc
end
end
__END__
-question?: should you permit the packing of multiple files in single .gz ?
+question?: should you permit the packing of multiple documents in single .xz ?
open @opt.fns, parse file
extract from file content: