diff options
Diffstat (limited to 'lib/sisu/v3/conf.rb')
-rw-r--r-- | lib/sisu/v3/conf.rb | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/lib/sisu/v3/conf.rb b/lib/sisu/v3/conf.rb index 51aeb005..8a323ac4 100644 --- a/lib/sisu/v3/conf.rb +++ b/lib/sisu/v3/conf.rb @@ -172,8 +172,11 @@ module SiSU_Initialize schema=SiSU_Env::SystemCall.new(rnc_src,rng_file) schema.relaxng(@opt.cmd) #rnc - FileUtils::cp(rnc_src,rnc_file) - FileUtils::chmod(0644,rnc_file) + if FileTest.file?(rnc_src) + FileUtils::cp(rnc_src,rnc_file) + FileUtils::chmod(0644,rnc_file) + else STDERR.puts %{\t*WARN* did not find rnc - "#{rnc_src}" [#{__FILE__}:#{__LINE__}]} + end end def trang_rnc_model_output_dom s=@suffix @@ -191,8 +194,11 @@ module SiSU_Initialize schema=SiSU_Env::SystemCall.new(rnc_src,rng_file) schema.relaxng(@opt.cmd) #rnc - FileUtils::cp(rnc_src,rnc_file) - FileUtils::chmod(0644,rnc_file) + if FileTest.file?(rnc_src) + FileUtils::cp(rnc_src,rnc_file) + FileUtils::chmod(0644,rnc_file) + else STDERR.puts %{\t*WARN* did not find rnc - "#{rnc_src}" [#{__FILE__}:#{__LINE__}]} + end end def trang_rnc_model_output_xhtml s=@suffix @@ -210,8 +216,11 @@ module SiSU_Initialize schema=SiSU_Env::SystemCall.new(rnc_src,rng_file) schema.relaxng(@opt.cmd) #rnc - FileUtils::cp(rnc_src,rnc_file) - FileUtils::chmod(0644,rnc_file) + if FileTest.file?(rnc_src) + FileUtils::cp(rnc_src,rnc_file) + FileUtils::chmod(0644,rnc_file) + else STDERR.puts %{\t*WARN* did not find rnc - "#{rnc_src}" [#{__FILE__}:#{__LINE__}]} + end end def trang_rnc_model_input_sax rnc_file=@env.processing_path.dal + '/sax.rnc' |