From a8493b259f8d166708601bb431267c86f1d78193 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Mon, 28 May 2012 04:47:13 -0400 Subject: v3: css, ensure css available for generated content * checks whether exists if not copies (for --init-site / --configure just copies, takes as a re-copy request) --- lib/sisu/v3/harvest.rb | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'lib/sisu/v3/harvest.rb') diff --git a/lib/sisu/v3/harvest.rb b/lib/sisu/v3/harvest.rb index 4ce5a09b..ea967c37 100644 --- a/lib/sisu/v3/harvest.rb +++ b/lib/sisu/v3/harvest.rb @@ -70,9 +70,14 @@ module SiSU_Harvest @env=SiSU_Env::InfoEnv.new end def read - harvest_pth="#{@env.path.webserv}/#{@opt.base_stub}" - FileUtils::mkdir_p(harvest_pth) unless FileTest.directory?(harvest_pth) - cases(@opt,@env) + begin + harvest_pth="#{@env.path.webserv}/#{@opt.base_stub}" + FileUtils::mkdir_p(harvest_pth) unless FileTest.directory?(harvest_pth) + cases(@opt,@env) + rescue + ensure + SiSU_Env::CreateSite.new(@opt.cmd).cp_css + end end def help puts <