소스 검색

Minor package cleanup.

Brit Butler 13 년 전
부모
커밋
ecfbe41b1f
3개의 변경된 파일7개의 추가작업 그리고 4개의 파일을 삭제
  1. 3 1
      src/coleslaw.lisp
  2. 2 3
      src/git.lisp
  3. 2 0
      src/packages.lisp

+ 3 - 1
src/coleslaw.lisp

@@ -17,8 +17,10 @@
17 17
   nil)
18 18
 
19 19
 (defun compile-blog ()
20
-  nil)
20
+  (with-current-directory *temporary-directory*
21
+    nil))
21 22
 
23
+;; TODO: Make update interval a config option.
22 24
 (defun main ()
23 25
   (load-config)
24 26
   (unwind-protect

+ 2 - 3
src/git.lisp

@@ -7,14 +7,13 @@
7 7
 (defun last-commit ()
8 8
   "Retrieve the SHA1 hash of the most recent blog commit."
9 9
   (multiple-value-bind (pid stdout stderr)
10
-      (iolib.os:with-current-directory "/home/redline/projects/coleslaw/"
10
+      (with-current-directory "/home/redline/projects/coleslaw/"
11 11
         (iolib.os:run-program "git" '("log" "-n 1")))
12 12
     (cl-ppcre:scan-to-strings "[0-9a-f]{40}" stdout)))
13 13
 
14 14
 (defun last-published ()
15 15
   "Retrieve the SHA1 hash of the most recent published blog."
16
-  (with-open-file (in "/home/redline/.coleslaw"
17
-                      :if-does-not-exist :create)
16
+  (with-open-file (in "/home/redline/.coleslaw" :if-does-not-exist :create)
18 17
     (read-line in nil)))
19 18
 
20 19
 (defun (setf last-published) (new-val)

+ 2 - 0
src/packages.lisp

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