From e23fc1055128eb604891a3e4ae86f258ae2c4bd0 Mon Sep 17 00:00:00 2001 From: Brit Butler Date: Wed, 29 Aug 2012 11:15:49 -0400 Subject: [PATCH] Replace usage of RUN-PROGRAM with trivial-shell's SHELL-COMMAND. --- coleslaw.asd | 2 +- src/coleslaw.lisp | 6 +++--- src/packages.lisp | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/coleslaw.asd b/coleslaw.asd index 7a7708a..1af4d8d 100644 --- a/coleslaw.asd +++ b/coleslaw.asd @@ -6,7 +6,7 @@ :author "Brit Butler " :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") diff --git a/src/coleslaw.lisp b/src/coleslaw.lisp index 5cda94f..7b2b2f1 100644 --- a/src/coleslaw.lisp +++ b/src/coleslaw.lisp @@ -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))) diff --git a/src/packages.lisp b/src/packages.lisp index 317c3ae..ddd2a1e 100644 --- a/src/packages.lisp +++ b/src/packages.lisp @@ -1,8 +1,8 @@ (defpackage :coleslaw (:documentation "Homepage: Github") (: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