From 0350755d84ca7c19398799f48914cd1ae2ede23d Mon Sep 17 00:00:00 2001 From: Michel Etienne Date: Thu, 13 Nov 2014 17:02:08 +0100 Subject: prepare version 2.5.1 --- lib/tasks/userdoc.rake | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) (limited to 'lib/tasks/userdoc.rake') diff --git a/lib/tasks/userdoc.rake b/lib/tasks/userdoc.rake index df72c32e4..8f93644c7 100644 --- a/lib/tasks/userdoc.rake +++ b/lib/tasks/userdoc.rake @@ -27,16 +27,21 @@ namespace :doc do Dir.chdir "tmp/doc" system "pandoc -s -o ../../userdoc.docx temp.textile" - # clean working directory - puts "clean temp files" - Dir.chdir "../.." - FileUtils.rm_r("tmp/doc") if File.exist?("tmp/doc") - - # patch docx - patch_docx "userdoc.docx" + if !File.exists?("userdoc.docx") + puts "pandoc failed to produce document" + else + # patch docx + patch_docx "userdoc.docx" + + # clean working directory + puts "clean temp files" + Dir.chdir "../.." + FileUtils.rm_r("tmp/doc") if File.exist?("tmp/doc") + + # end job + puts "User doc completed" + end - # end job - puts "User doc completed" end def merge_textiles -- cgit v1.2.3