diff --git a/test/setup-ox-hugo.el b/test/setup-ox-hugo.el index 712aecc..74a0d63 100644 --- a/test/setup-ox-hugo.el +++ b/test/setup-ox-hugo.el @@ -1,4 +1,4 @@ -;; Time-stamp: <2017-09-25 17:53:26 kmodi> +;; Time-stamp: <2017-09-25 18:12:29 kmodi> ;; Setup to test ox-hugo using emacs -Q and the latest stable version of Org @@ -7,17 +7,19 @@ (setq-default indent-tabs-mode nil) (defvar ox-hugo-elpa (let ((dir (getenv "OX_HUGO_ELPA"))) - (unless dir - (let ((base-dir (file-name-as-directory - (if (not (string-match-p "/com\\.termux/" temporary-file-directory)) - (concat temporary-file-directory (getenv "USER")) - ;; /tmp/ is not writable on Android Termux for example. - (getenv "HOME"))))) - (setq dir (concat base-dir "ox-hugo-dev/")))) + (when (or (null dir) + (string-match-p "/com\\.termux/" temporary-file-directory)) + (let ((base-dir (cond + ((string-match-p "/com\\.termux/" temporary-file-directory) + ;; /tmp/ is not writable on Android Termux for example. + (setq base-dir (getenv "HOME"))) + ((null dir) + (concat temporary-file-directory (getenv "USER")))))) + (setq dir (concat (file-name-as-directory base-dir) "ox-hugo-dev/")))) (setq dir (file-name-as-directory dir)) (make-directory dir :parents) dir)) -(message "ox-hugo-elpa: %S" ox-hugo-elpa) +(message "ox-hugo-elpa: %s" ox-hugo-elpa) (let* ((bin-dir (when (and invocation-directory (file-exists-p invocation-directory))