]> git.eshelyaron.com Git - esy-publish.git/commitdiff
Report progress while copying files to remote
authorEshel Yaron <me@eshelyaron.com>
Sun, 2 Apr 2023 06:42:21 +0000 (09:42 +0300)
committerEshel Yaron <me@eshelyaron.com>
Sun, 2 Apr 2023 06:42:21 +0000 (09:42 +0300)
publish.el

index e738fe325514a676ae860fde61de676858c5d66a..4bb5362eaf9ce1fb8f9db149ae7d57f331c01fe9 100644 (file)
@@ -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))
   (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")