From 3a3037c4a06759a752c60c715f9ccae8c219c7b0 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 15 Jul 2014 18:52:57 -0400 Subject: v5 v6: base images & css --- lib/sisu/v6/sysenv.rb | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) (limited to 'lib/sisu/v6/sysenv.rb') diff --git a/lib/sisu/v6/sysenv.rb b/lib/sisu/v6/sysenv.rb index 0a1df86e..902cedfb 100644 --- a/lib/sisu/v6/sysenv.rb +++ b/lib/sisu/v6/sysenv.rb @@ -7128,8 +7128,13 @@ WOK end end def cp_css - FileUtils::mkdir_p("#{@env.path.output}/#{@env.path.style}") unless FileTest.directory?("#{@env.path.output}/#{@env.path.style}") - css_path=['/etc/sisu/css',"#{@home}/.sisu/css","#{@pwd}/_sisu/css"] #BROKEN + FileUtils::mkdir_p("#{@env.path.output}/#{@env.path.style}") \ + unless FileTest.directory?("#{@env.path.output}/#{@env.path.style}") + css_path=[ + '/etc/sisu/css', + "#{@home}/.sisu/css", + "#{@pwd}/_sisu/css", + ] #BROKEN if defined? @rc['permission_set']['css_modify'] \ and @rc['permission_set']['css_modify'] SiSU_Screen::Ansi.new(@cmd,"*WARN* modify is css set to: #{@rc['permission_set']['css_modify']}").warn if @cmd=~/[MV]/ @@ -7146,7 +7151,11 @@ WOK FileUtils::cd(@pwd) end end - else SiSU_Screen::Ansi.new(@cmd,"*WARN* modify css is not set or is set to: false").warn if @cmd=~/[MV]/ + else + SiSU_Screen::Ansi.new( + @cmd, + "*WARN* modify css is not set or is set to: false" + ).warn if @cmd=~/[MV]/ end fn_css=SiSU_Env::CSS_Default.new css=SiSU_Style::CSS.new @@ -7178,28 +7187,28 @@ WOK end if @cmd =~/C/ \ or (@cmd =~/[x]/ \ - and not FileTest.file?("#{path_style}/#{fn_css.xml_sax}")) + and not FileTest.file?("#{path_style}/#{fn_css.xml_sax}")) style=File.new("#{path_style}/#{fn_css.xml_sax}",'w') style << css.xml_sax style.close end if @cmd =~/C/ \ or (@cmd =~/[X]/ \ - and not FileTest.file?("#{path_style}/#{fn_css.xml_dom}")) + and not FileTest.file?("#{path_style}/#{fn_css.xml_dom}")) style=File.new("#{path_style}/#{fn_css.xml_dom}",'w') style << css.xml_dom style.close end if @cmd =~/C/ \ or (@cmd =~/[xX]/ \ - and not FileTest.file?("#{path_style}/#{fn_css.xml_docbook}")) + and not FileTest.file?("#{path_style}/#{fn_css.xml_docbook}")) style=File.new("#{path_style}/#{fn_css.xml_docbook}",'w') style << css.xml_docbook style.close end if @cmd =~/C/ \ or (@cmd =~/[b]/ \ - and not FileTest.file?("#{path_style}/#{fn_css.xhtml}")) + and not FileTest.file?("#{path_style}/#{fn_css.xhtml}")) style=File.new("#{path_style}/#{fn_css.xhtml}",'w') style << css.xhtml style.close -- cgit v1.2.3