diff --git a/src/coleslaw.lisp b/src/coleslaw.lisp index 0a9b14a..9899eea 100644 --- a/src/coleslaw.lisp +++ b/src/coleslaw.lisp @@ -53,9 +53,9 @@ If RAW is non-nil, write the content without wrapping it in the base template." (with-current-directory coleslaw-conf:*basedir* (run-program "mv" (mapcar #'namestring (list staging new-build))) (when (probe-file prev) - (cl-fad:delete-directory-and-files (read-symlink prev))) + (cl-fad:delete-directory-and-files (truename prev))) (when (probe-file curr) - (update-symlink prev (read-symlink curr))) + (update-symlink prev (truename curr))) (update-symlink curr new-build)))))) (defun main () diff --git a/src/packages.lisp b/src/packages.lisp index f203c8a..317c3ae 100644 --- a/src/packages.lisp +++ b/src/packages.lisp @@ -3,7 +3,6 @@ (:use :cl :closure-template) (:import-from :iolib.os #:with-current-directory #:run-program) - (:import-from :iolib.pathnames #:file-path-namestring) (:import-from :alexandria #:hash-table-values #:make-keyword) (:export #:main diff --git a/src/util.lisp b/src/util.lisp index dcf04c9..6c9eb23 100644 --- a/src/util.lisp +++ b/src/util.lisp @@ -5,14 +5,6 @@ If ARGS is provided, use (apply 'format nil PATH ARGS) as the value of PATH." (merge-pathnames (apply 'format nil path args) coleslaw-conf:*basedir*)) -(defun to-pathname (file &optional (parent coleslaw-conf:*basedir*)) - "Convert an iolib file-path back to a pathname." - (merge-pathnames (file-path-namestring file) parent)) - -(defun read-symlink (path) - "A trivial wrapper over iolib.os that returns the pathname in the symlink PATH." - (to-pathname (iolib.os:read-symlink path))) - (defmacro do-files ((var path &optional extension) &body body) "For each file on PATH, run BODY. If EXTENSION is provided, only run BODY on files that match the given extension."