aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v5/se_createsite.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v5/se_createsite.rb')
-rw-r--r--lib/sisu/v5/se_createsite.rb37
1 files changed, 21 insertions, 16 deletions
diff --git a/lib/sisu/v5/se_createsite.rb b/lib/sisu/v5/se_createsite.rb
index 33e334ce..a7ab7cf5 100644
--- a/lib/sisu/v5/se_createsite.rb
+++ b/lib/sisu/v5/se_createsite.rb
@@ -190,16 +190,20 @@ module SiSU_Create_Site
if defined? @rc['permission_set']['css_modify'] \
and @rc['permission_set']['css_modify']
SiSU_Screen::Ansi.new(
- @opt.cmd,
+ @opt.selections.str,
"*WARN* modify is css set to: #{@rc['permission_set']['css_modify']}"
- ).warn if @opt.cmd=~/[MV]/
+ ).warn if @opt.act[:verbose_plus][:set]==:on \
+ or @opt.act[:maintenance][:set]==:on
css_path.each do |x|
if FileTest.directory?(x)
FileUtils::cd(x)
source=Dir.glob("*.{css}")
source.each do |i|
if FileTest.file?(i)
- FileUtils::cp(i,"#{@env.path.output}/#{@env.path.style}")
+ FileUtils::cp(
+ i,
+ @env.path.output + '/' + @env.path.style
+ )
else STDERR.puts %{\t*WARN* did not find css - "#{i}" [#{__FILE__}:#{__LINE__}]}
end
end
@@ -208,62 +212,63 @@ module SiSU_Create_Site
end
else
SiSU_Screen::Ansi.new(
- @opt.cmd,
+ @opt.selections.str,
"*WARN* modify css is not set or is set to: false"
- ).warn if @opt.cmd=~/[MV]/
+ ).warn if @opt.act[:verbose_plus][:set]==:on \
+ or @opt.act[:maintenance][:set]==:on
end
fn_css=SiSU_Env::CSS_Default.new
css=SiSU_Style::CSS.new
path_style="#{@env.path.output}/#{@env.path.style}"
FileUtils::mkdir_p(path_style) \
unless FileTest.directory?(path_style)
- if @opt.cmd =~/C/ \
+ if @opt.act[:site_init][:set]==:on \
or not FileTest.file?("#{path_style}/#{fn_css.homepage}")
style=File.new("#{path_style}/#{fn_css.homepage}",'w')
style << css.homepage
style.close
end
- if @opt.cmd =~/C/ \
+ if @opt.act[:site_init][:set]==:on \
or not FileTest.file?("#{path_style}/#{fn_css.html_tables}")
style=File.new("#{path_style}/#{fn_css.html_tables}",'w')
style << css.html_tables
style.close
end
- if @opt.cmd =~/C/ \
+ if @opt.act[:site_init][:set]==:on \
or not FileTest.file?("#{path_style}/#{fn_css.html}")
style=File.new("#{path_style}/#{fn_css.html}",'w')
style << css.html
style.close
end
- if @opt.cmd =~/C/ \
+ if @opt.act[:site_init][:set]==:on \
or not FileTest.file?("#{path_style}/#{fn_css.harvest}")
style=File.new("#{path_style}/#{fn_css.harvest}",'w')
style << css.harvest
style.close
end
- if @opt.cmd =~/C/ \
- or (@opt.cmd =~/[x]/ \
+ if @opt.act[:site_init][:set]==:on \
+ or (@opt.act[:xml_sax][:set]==:on \
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 @opt.cmd =~/C/ \
- or (@opt.cmd =~/[X]/ \
+ if @opt.act[:site_init][:set]==:on \
+ or (@opt.act[:xml_dom][:set]==:on \
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 @opt.cmd =~/C/ \
+ if @opt.act[:site_init][:set]==:on \
or (@opt.act[:xml_docbook_book][:set] == :on \
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 @opt.cmd =~/C/ \
- or (@opt.cmd =~/[b]/ \
+ if @opt.act[:site_init][:set]==:on \
+ or (@opt.act[:xhtml][:set] == :on \
and not FileTest.file?("#{path_style}/#{fn_css.xhtml}"))
style=File.new("#{path_style}/#{fn_css.xhtml}",'w')
style << css.xhtml