diff options
Diffstat (limited to 'lib/tasks')
| -rw-r--r-- | lib/tasks/userdoc.rake | 23 |
1 files changed, 14 insertions, 9 deletions
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 |
