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.rb30
1 files changed, 21 insertions, 9 deletions
diff --git a/lib/sisu/v3/sisupod_make.rb b/lib/sisu/v3/sisupod_make.rb
index b4ef43de..33ae8db2 100644
--- a/lib/sisu/v3/sisupod_make.rb
+++ b/lib/sisu/v3/sisupod_make.rb
@@ -7,7 +7,8 @@
* Author: Ralph Amissah
- * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved.
+ * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010, 2011, 2012 Ralph Amissah, All Rights Reserved.
* License: GPL 3 or later:
@@ -33,9 +34,7 @@
<http://www.fsf.org/licensing/licenses/gpl.html>
<http://www.gnu.org/licenses/gpl.html>
- <http://www.jus.uio.no/sisu/gpl.fsf/toc.html>
- <http://www.jus.uio.no/sisu/gpl.fsf/doc.html>
- <http://www.jus.uio.no/sisu/gpl.fsf/plain.txt>
+ <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
* SiSU uses:
* Standard SiSU markup syntax,
@@ -47,7 +46,7 @@
<http://www.sisudoc.org>
* Download:
- <http://www.jus.uio.no/sisu/SiSU/download.html>
+ <http://www.sisudoc.org/sisu/en/SiSU/download.html>
* Ralph Amissah
<ralph@amissah.com>
@@ -273,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
@@ -303,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: