2021-01-22 21:01:45 +00:00
|
|
|
#!/usr/bin/env sh
|
|
|
|
":"; exec emacs --quick --script "$0" -- "$@" # -*- mode: emacs-lisp; lexical-binding: t; -*-
|
|
|
|
|
|
|
|
(setq default-directory (file-name-directory load-file-name))
|
|
|
|
|
2021-01-23 14:23:24 +00:00
|
|
|
(setq log-file (format "%s-log.txt" (file-name-base load-file-name)))
|
|
|
|
|
2021-01-22 21:01:45 +00:00
|
|
|
(load (expand-file-name "initialise.el") nil t)
|
|
|
|
|
2021-01-23 11:13:53 +00:00
|
|
|
(message "Starting publish process")
|
2021-01-22 21:01:45 +00:00
|
|
|
|
2021-01-30 19:11:54 +00:00
|
|
|
;; Do the things
|
2021-01-24 08:03:44 +00:00
|
|
|
|
2021-01-30 19:11:54 +00:00
|
|
|
(load (expand-file-name "async-proc-management.el") nil t)
|
2021-01-22 21:01:45 +00:00
|
|
|
|
2021-05-30 08:08:04 +00:00
|
|
|
(apm-exec '("htmlize.sh")) ; "check-package-updates.sh"))
|
2021-01-22 21:01:45 +00:00
|
|
|
|
2021-01-29 15:25:26 +00:00
|
|
|
(if (not (file-exists-p (concat user-emacs-directory "xkcd/")))
|
2021-01-30 19:11:54 +00:00
|
|
|
(apm-exec "org-html.sh" :then "org-pdf.sh")
|
|
|
|
(apm-exec '("org-html.sh" "org-pdf.sh")))
|
2021-01-22 21:01:45 +00:00
|
|
|
|
2021-01-30 19:11:54 +00:00
|
|
|
(apm-wait-and-monitor)
|
2021-01-22 21:01:45 +00:00
|
|
|
|
2021-01-24 08:03:44 +00:00
|
|
|
(if (= 0 exit-code)
|
2021-01-30 19:11:54 +00:00
|
|
|
(message "[1;32] Config publish content generated!%s" (apm-space-fill-line 33))
|
|
|
|
(message "[1;31] Config publishing aborted%s" (apm-space-fill-line 25)))
|
2021-01-22 21:01:45 +00:00
|
|
|
|
|
|
|
(setq inhibit-message t)
|
|
|
|
(kill-emacs exit-code)
|