1.1--- a/lisp/bin/homer.lisp Tue May 14 15:09:28 2024 -0400
1.2+++ b/lisp/bin/homer.lisp Tue May 14 15:14:15 2024 -0400
1.3@@ -111,12 +111,16 @@
1.4 *home-hidden-paths*)))
1.5 (error 'file-error :pathname src))))
1.6
1.7+(defun homer-copy (input output)
1.8+ (ensure-directories-exist output :verbose t)
1.9+ (uiop:copy-file input output))
1.10+
1.11 (defun homer-maybe-push (file)
1.12 (let ((form (compare-home-file file)))
1.13 (case (car form)
1.14 (:push (progn
1.15 (println (format nil ":PUSH ~A" (cddr form)))
1.16- (uiop:copy-file (cddr form) (cadr form))))
1.17+ (homer-copy (cddr form) (cadr form))))
1.18 (t nil))))
1.19
1.20 (defun homer-maybe-pull (file)
1.21@@ -124,7 +128,7 @@
1.22 (case (car form)
1.23 (:pull (progn
1.24 (println (format nil ":PULL ~A" (cddr form)))
1.25- (uiop:copy-file (cadr form) (cddr form))))
1.26+ (homer-copy (cadr form) (cddr form))))
1.27 (t nil))))
1.28
1.29 (defun homer-maybe-install (file)
1.30@@ -132,10 +136,10 @@
1.31 (case (car form)
1.32 (:pull (progn
1.33 (println (format nil ":PULL ~A" (cddr form)))
1.34- (uiop:copy-file (cadr form) (cddr form))))
1.35+ (homer-copy (cadr form) (cddr form))))
1.36 (:new (progn
1.37 (println (format nil ":NEW ~A" (cddr form)))
1.38- (uiop:copy-file (cadr form) (cddr form))))
1.39+ (homer-copy (cadr form) (cddr form))))
1.40 (:push (warn! "skipping file:" (cddr form)))
1.41 (t nil))))
1.42