From ecfbe41b1fbbd76ef67dd17444f6d9041fe4fba1 Mon Sep 17 00:00:00 2001 From: Brit Butler Date: Sat, 18 Aug 2012 16:51:07 -0400 Subject: [PATCH] Minor package cleanup. --- src/coleslaw.lisp | 4 +++- src/git.lisp | 5 ++--- src/packages.lisp | 2 ++ 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/coleslaw.lisp b/src/coleslaw.lisp index 19d5555..76bee64 100644 --- a/src/coleslaw.lisp +++ b/src/coleslaw.lisp @@ -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 diff --git a/src/git.lisp b/src/git.lisp index def977c..91bd32d 100644 --- a/src/git.lisp +++ b/src/git.lisp @@ -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) diff --git a/src/packages.lisp b/src/packages.lisp index 78efffb..1742565 100644 --- a/src/packages.lisp +++ b/src/packages.lisp @@ -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