From: Eshel Yaron Date: Sun, 2 Apr 2023 06:42:21 +0000 (+0300) Subject: Report progress while copying files to remote X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1d3bf569e6872c284705218d29c3d95e1d8f689a;p=esy-publish.git Report progress while copying files to remote --- 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")