Minor package cleanup.
This commit is contained in:
parent
c795b1bd59
commit
ecfbe41b1f
3 changed files with 7 additions and 4 deletions
|
@ -17,8 +17,10 @@
|
|||
nil)
|
||||
|
||||
(defun compile-blog ()
|
||||
nil)
|
||||
(with-current-directory *temporary-directory*
|
||||
nil))
|
||||
|
||||
;; TODO: Make update interval a config option.
|
||||
(defun main ()
|
||||
(load-config)
|
||||
(unwind-protect
|
||||
|
|
|
@ -7,14 +7,13 @@
|
|||
(defun last-commit ()
|
||||
"Retrieve the SHA1 hash of the most recent blog commit."
|
||||
(multiple-value-bind (pid stdout stderr)
|
||||
(iolib.os:with-current-directory "/home/redline/projects/coleslaw/"
|
||||
(with-current-directory "/home/redline/projects/coleslaw/"
|
||||
(iolib.os:run-program "git" '("log" "-n 1")))
|
||||
(cl-ppcre:scan-to-strings "[0-9a-f]{40}" stdout)))
|
||||
|
||||
(defun last-published ()
|
||||
"Retrieve the SHA1 hash of the most recent published blog."
|
||||
(with-open-file (in "/home/redline/.coleslaw"
|
||||
:if-does-not-exist :create)
|
||||
(with-open-file (in "/home/redline/.coleslaw" :if-does-not-exist :create)
|
||||
(read-line in nil)))
|
||||
|
||||
(defun (setf last-published) (new-val)
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
(defpackage :coleslaw
|
||||
(:use :cl :closure-template)
|
||||
(:import-from :iolib.os #:with-current-directory
|
||||
#:*temporary-directory*)
|
||||
(:export ;; coleslaw-core
|
||||
#:*storage*
|
||||
#:get-credentials
|
||||
|
|
Loading…
Add table
Reference in a new issue