Replace usage of RUN-PROGRAM with trivial-shell's SHELL-COMMAND.

This commit is contained in:
Brit Butler 2012-08-29 11:15:49 -04:00
parent 791e5cf325
commit e23fc10551
3 changed files with 6 additions and 6 deletions

View file

@ -6,7 +6,7 @@
:author "Brit Butler <redline6561@gmail.com>"
:pathname "src/"
:depends-on (:alexandria :closure-template :3bmd :3bmd-ext-code-blocks
:local-time :iolib.os :cl-fad)
:local-time :trivial-shell :iolib.os :cl-fad)
:serial t
:components ((:file "packages")
(:file "config")

View file

@ -32,14 +32,14 @@ If RAW is non-nil, write the content without wrapping it in the base template."
(static-dir (merge-pathnames "static" (repo *config*))))
(dolist (dir (list css-dir static-dir))
(when (probe-file dir)
(run-program "cp" `("-R" ,(namestring dir) ".")))))
(shell-command (format nil "cp -R ~a ." dir)))))
(render-posts)
(render-indices)
(render-feed)))
(defun update-symlink (path target)
"Update the symlink at PATH to point to TARGET."
(run-program "ln" (list "-sfn" (namestring target) (namestring path))))
(shell-command (format nil "ln -sfn ~a ~a" target path)))
(defgeneric deploy (staging)
(:documentation "Deploy the STAGING dir, updating the .prev and .curr symlinks.")
@ -51,7 +51,7 @@ If RAW is non-nil, write the content without wrapping it in the base template."
(curr (deploy-path ".curr")))
(ensure-directories-exist new-build)
(with-current-directory coleslaw-conf:*basedir*
(run-program "mv" (mapcar #'namestring (list staging new-build)))
(shell-command (format nil "mv ~a ~a" staging new-build))
(if (and (probe-file prev) (equal prev (truename prev)))
(delete-file prev)
(cl-fad:delete-directory-and-files (truename prev)))

View file

@ -1,8 +1,8 @@
(defpackage :coleslaw
(:documentation "Homepage: <a href=\"http://github.com/redline6561/coleslaw\">Github</a>")
(:use :cl :closure-template)
(:import-from :iolib.os #:with-current-directory
#:run-program)
(:import-from :trivial-shell #:shell-command)
(:import-from :iolib.os #:with-current-directory)
(:import-from :alexandria #:hash-table-values
#:make-keyword)
(:export #:main