From 1d3bf569e6872c284705218d29c3d95e1d8f689a Mon Sep 17 00:00:00 2001 From: Eshel Yaron Date: Sun, 2 Apr 2023 09:42:21 +0300 Subject: [PATCH] Report progress while copying files to remote --- publish.el | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/publish.el b/publish.el index e738fe3..4bb5362 100644 --- a/publish.el +++ b/publish.el @@ -32,7 +32,7 @@ (buffer-string))) (defvar esy/publish-remote-directory - "/ssh:root@direct.eshelyaron.com:/var/www/html") + "/rsync:root@direct.eshelyaron.com:/var/www/html") (defvar esy/publish-root-directory (file-name-directory load-file-name)) @@ -153,22 +153,19 @@ (esy/publish-sitemap plist)) (defun esy/publish-to-remote () - (delete-directory esy/publish-remote-directory t) - (copy-directory esy/publish-out-directory esy/publish-remote-directory nil t t) - ;; (let ((files (directory-files-recursively esy/publish-out-directory - ;; (rx (or ".html" - ;; ".ico" - ;; ".svg" - ;; ".xml" - ;; ".css") - ;; eos)))) - ;; (dolist-with-progress-reporter (file files) "Copying files" - ;; (copy-file file - ;; (expand-file-name (file-relative-name file - ;; esy/publish-out-directory) - ;; esy/publish-remote-directory) - ;; t))) - ) + (let ((files (directory-files-recursively esy/publish-out-directory + (rx (or ".html" + ".ico" + ".svg" + ".xml" + ".css") + eos)))) + (dolist-with-progress-reporter (file files) "Copying files" + (copy-file file (expand-file-name + (file-relative-name file + esy/publish-out-directory) + esy/publish-remote-directory) + t)))) (defun esy/publish (&optional modified-only) (interactive "P") -- 2.39.2