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")))
(ensure-directories-exist new-build)
(run-program "mv ~a ~a" staging new-build)
; KLUDGE: Is there a better way to portably catch dead symlinks?
(if (and (probe-file prev) (equal prev (ignore-errors (truename prev))))
(delete-file prev)
(cl-fad:delete-directory-and-files (truename prev)))
(when (probe-file prev)
(let ((dest (truename prev)))
(if (equal prev dest)
(delete-file prev)
(cl-fad:delete-directory-and-files dest))))
(when (probe-file curr)
(update-symlink prev (truename curr)))
(update-symlink curr new-build)))))