diff options
author | Ralph Amissah <ralph@amissah.com> | 2011-12-19 22:20:50 -0500 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2011-12-19 22:52:14 -0500 |
commit | 9ef4a603a90b8d5363404fc23f4dc1b8f2aa0c4f (patch) | |
tree | d98463c020574cf3e4a974678f2e5dd45281e6c4 /lib/sisu/v3/sysenv.rb | |
parent | v3: options, --find & --glob, use for general search in base directory (diff) |
v3: sysenv, html files in _sisu/home (*.html) copied as home pages
Diffstat (limited to 'lib/sisu/v3/sysenv.rb')
-rw-r--r-- | lib/sisu/v3/sysenv.rb | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/sisu/v3/sysenv.rb b/lib/sisu/v3/sysenv.rb index 98a58f72..e18a82c8 100644 --- a/lib/sisu/v3/sysenv.rb +++ b/lib/sisu/v3/sysenv.rb @@ -5155,18 +5155,16 @@ WOK @vz_home=SiSU_Viz::Home.new end def homepage - homepage_path=nil + home_pages_manually_created=nil @env.sys.rc_path.each do |v| - if FileTest.file?("#{v}/home/index.html") - homepage_path="#{v}/home/index.html" + home_pages_manually_created=Dir.glob("#{v}/home/*.html") + if home_pages_manually_created.length > 0 break end end FileUtils::mkdir_p("#{@env.path.webserv}/#{@env.path.stub_pwd}") unless FileTest.directory?("#{@env.path.webserv}/#{@env.path.stub_pwd}") - if homepage_path \ - and FileTest.file?(homepage_path) - FileUtils::cp(homepage_path,"#{@env.path.webserv}/#{@env.path.stub_pwd}/index.html") - FileUtils::cp(homepage_path,"#{@env.path.webserv}/#{@env.path.stub_pwd}/toc.html") + if home_pages_manually_created + FileUtils.cp(home_pages_manually_created,"#{@env.path.webserv}/#{@env.path.stub_pwd}") else doc_skin=nil sk_doc='doc/skin_sisu.rb' |