Minor package cleanup.

This commit is contained in:
Brit Butler 2012-08-18 16:51:07 -04:00
parent c795b1bd59
commit ecfbe41b1f
3 changed files with 7 additions and 4 deletions

View file

@ -17,8 +17,10 @@
nil) nil)
(defun compile-blog () (defun compile-blog ()
nil) (with-current-directory *temporary-directory*
nil))
;; TODO: Make update interval a config option.
(defun main () (defun main ()
(load-config) (load-config)
(unwind-protect (unwind-protect

View file

@ -7,14 +7,13 @@
(defun last-commit () (defun last-commit ()
"Retrieve the SHA1 hash of the most recent blog commit." "Retrieve the SHA1 hash of the most recent blog commit."
(multiple-value-bind (pid stdout stderr) (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"))) (iolib.os:run-program "git" '("log" "-n 1")))
(cl-ppcre:scan-to-strings "[0-9a-f]{40}" stdout))) (cl-ppcre:scan-to-strings "[0-9a-f]{40}" stdout)))
(defun last-published () (defun last-published ()
"Retrieve the SHA1 hash of the most recent published blog." "Retrieve the SHA1 hash of the most recent published blog."
(with-open-file (in "/home/redline/.coleslaw" (with-open-file (in "/home/redline/.coleslaw" :if-does-not-exist :create)
:if-does-not-exist :create)
(read-line in nil))) (read-line in nil)))
(defun (setf last-published) (new-val) (defun (setf last-published) (new-val)

View file

@ -1,5 +1,7 @@
(defpackage :coleslaw (defpackage :coleslaw
(:use :cl :closure-template) (:use :cl :closure-template)
(:import-from :iolib.os #:with-current-directory
#:*temporary-directory*)
(:export ;; coleslaw-core (:export ;; coleslaw-core
#:*storage* #:*storage*
#:get-credentials #:get-credentials