diff options
author | Ralph Amissah <ralph@amissah.com> | 2014-07-15 18:52:57 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2014-07-15 18:52:57 -0400 |
commit | 3a3037c4a06759a752c60c715f9ccae8c219c7b0 (patch) | |
tree | 7111de6515d33e0d6538219f993f7b7e015d31a9 /lib/sisu/v6/sysenv.rb | |
parent | v5 v6: docbook, status, under construction notice removed (still much to do) (diff) |
v5 v6: base images & css
Diffstat (limited to 'lib/sisu/v6/sysenv.rb')
-rw-r--r-- | lib/sisu/v6/sysenv.rb | 23 |
1 files changed, 16 insertions, 7 deletions
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 |