diff options
author | Ralph Amissah <ralph@amissah.com> | 2012-02-03 20:02:32 -0500 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2012-02-03 20:26:44 -0500 |
commit | 145f3092505f614ca5c81a4cbcfea9f22329e745 (patch) | |
tree | 9bc696e29f1d8df43f65279c7e1dc4b696cc9007 /lib/sisu/v3/update.rb | |
parent | v3 v3dv: vim syntax highlighting, patch from Thilo Six <T.Six@gmx.de> applied (diff) |
v3 v3dv: path & url links, updates for multiple output directory structures
Diffstat (limited to 'lib/sisu/v3/update.rb')
-rw-r--r-- | lib/sisu/v3/update.rb | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/lib/sisu/v3/update.rb b/lib/sisu/v3/update.rb index e46743ec..5b5430e2 100644 --- a/lib/sisu/v3/update.rb +++ b/lib/sisu/v3/update.rb @@ -83,42 +83,48 @@ module SiSU_Update_control_flag @env=SiSU_Env::Info_env.new(@md.fns) out=@env.path.output @base_path="#{out}/#{@md.fnb}" + @pdf_fn=SiSU_Env::SiSU_file.new(@md).base_filename end def set_flags #-mNhwpoabxXyv flag='-v' - if FileTest.file?("#{@base_path}/#{@md.fn[:doc]}")==true + if FileTest.file?("#{@md.file.output_path.txt.dir}/#{@md.file.base_filename.txt}")==true flag=flag + 'a' end - if FileTest.file?("#{@base_path}/#{@md.fn[:toc]}")==true \ - or FileTest.file?("#{@base_path}/#{@md.fn[:doc]}")==true + if FileTest.file?("#{@md.file.output_path.html_seg.dir}/#{@md.file.base_filename.html_seg}")==true + or FileTest.file?("#{@md.file.output_path.html_scroll.dir}/#{@md.file.base_filename.html_scroll}")==true flag=flag + 'h' end - if FileTest.file?("#{@base_path}/#{@md.fn[:xhtml]}")==true + if FileTest.file?("#{@md.file.output_path.xhtml.dir}/#{@md.file.base_filename.xhtml}")==true flag=flag + 'b' end - if FileTest.file?("#{@base_path}/#{@md.fn[:sax]}")==true + if FileTest.file?("#{@md.file.output_path.xml_sax.dir}/#{@md.file.base_filename.xml_sax}")==true flag=flag + 'x' end - if FileTest.file?("#{@base_path}/#{@md.fn[:dom]}")==true + if FileTest.file?("#{@md.file.output_path.xml_dom.dir}/#{@md.file.base_filename.xml_dom}")==true flag=flag + 'X' end - if FileTest.file?("#{@base_path}/#{@md.fn[:odf]}")==true + if FileTest.file?("#{@md.file.output_path.epub.dir}/#{@md.file.base_filename.epub}")==true + flag=flag + 'e' + end + if FileTest.file?("#{@md.file.output_path.odt.dir}/#{@md.file.base_filename.odt}")==true flag=flag + 'o' end - if FileTest.file?("#{@base_path}/#{@md.fn[:pdf_p]}")==true \ - or FileTest.file?("#{@base_path}/#{@md.fn[:pdf_l]}")==true + if FileTest.file?("#{@md.file.output_path.pdf.dir}/#{@pdf_fn.pdf_p_a4}")==true \ + or FileTest.file?("#{@md.file.output_path.pdf.dir}/#{@pdf_fn.pdf_l_a4}")==true \ + or FileTest.file?("#{@md.file.output_path.pdf.dir}/#{@pdf_fn.pdf_p_letter}")==true \ + or FileTest.file?("#{@md.file.output_path.pdf.dir}/#{@pdf_fn.pdf_l_letter}")==true flag=flag + 'p' end - if FileTest.file?("#{@base_path}/#{@md.fn[:concordance]}")==true + if FileTest.file?("#{@md.file.output_path.html_concordance.dir}/#{@md.file.base_filename.html_concordance}")==true flag=flag + 'w' end - if FileTest.file?("#{@base_path}/#{@md.fn[:digest]}")==true + if FileTest.file?("#{@md.file.output_path.digest.dir}/#{@md.file.base_filename.digest}")==true flag=flag + 'N' end - if FileTest.file?("#{@base_path}/#{@md.fns}")==true + if FileTest.file?("#{@md.file.output_path.src.dir}/#{@md.file.base_filename.src}")==true flag=flag + 's' end - if FileTest.file?("#{@base_path}/sisupod.tgz")==true + if FileTest.file?("#{@md.file.output_path.sisupod.dir}/#{@md.file.base_filename.sisupod}")==true flag=flag + 'S' end puts flag |