I am idiot sometimes. Fix DEPLOY.

This commit is contained in:
Brit Butler 2012-08-29 23:48:14 -04:00
parent da8895a28a
commit 3a83616bb8

View file

@ -46,10 +46,11 @@ If RAW is non-nil, write the content without wrapping it in the base template."
(curr (app-path ".curr"))) (curr (app-path ".curr")))
(ensure-directories-exist new-build) (ensure-directories-exist new-build)
(run-program "mv ~a ~a" staging new-build) (run-program "mv ~a ~a" staging new-build)
; KLUDGE: Is there a better way to portably catch dead symlinks? (when (probe-file prev)
(if (and (probe-file prev) (equal prev (ignore-errors (truename prev)))) (let ((dest (truename prev)))
(delete-file prev) (if (equal prev dest)
(cl-fad:delete-directory-and-files (truename prev))) (delete-file prev)
(cl-fad:delete-directory-and-files dest))))
(when (probe-file curr) (when (probe-file curr)
(update-symlink prev (truename curr))) (update-symlink prev (truename curr)))
(update-symlink curr new-build))))) (update-symlink curr new-build)))))