summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJambunathan K <kjambunathan@gmail.com>2011-07-22 16:54:40 +0530
committerBastien Guerry <bzg@altern.org>2011-07-22 17:49:03 +0200
commit3e2057732afd9b745c18936b66f10662d47ac174 (patch)
tree04ef11d6d924c5070f3b5885cb20a259741ff1de
parent651e38ddc6f8d6600b5f6117d740a3ef5fdcd63d (diff)
downloadorg-mode-3e2057732afd9b745c18936b66f10662d47ac174.tar.gz
org-odt: Check for zip early during export
* contrib/lisp/org-odt.el (org-odt-init-outfile): Abort export if zip utility is not available.
-rw-r--r--contrib/lisp/org-odt.el4
1 files changed, 4 insertions, 0 deletions
diff --git a/contrib/lisp/org-odt.el b/contrib/lisp/org-odt.el
index c1c5b7f..b7e5a70 100644
--- a/contrib/lisp/org-odt.el
+++ b/contrib/lisp/org-odt.el
@@ -1226,6 +1226,10 @@ MAY-INLINE-P allows inlining it as an image."
(apply 'org-lparse-format-tags tag text prefix suffix args)))
(defun org-odt-init-outfile (filename)
+ (unless (executable-find "zip")
+ ;; Not at all OSes ship with zip by default
+ (error "Executable \"zip\" needed for creating OpenDocument files. Aborting."))
+
(let* ((outdir (make-temp-file org-export-odt-tmpdir-prefix t))
(mimetype-file (expand-file-name "mimetype" outdir))
(content-file (expand-file-name "content.xml" outdir))