emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/greader 39beee3e39 1/3: Function `greader-piper-find-sc


From: ELPA Syncer
Subject: [elpa] externals/greader 39beee3e39 1/3: Function `greader-piper-find-script', that now handles correctly the case in which the piper.sh script is not present.
Date: Thu, 19 Dec 2024 00:58:02 -0500 (EST)

branch: externals/greader
commit 39beee3e39bd0e5ad6c000a162e3d6b77465cc91
Author: Michelangelo Rodriguez <michelangelo.rodriguez@gmail.com>
Commit: Michelangelo Rodriguez <michelangelo.rodriguez@gmail.com>

    Function `greader-piper-find-script', that now handles correctly the case 
in which the piper.sh script is not present.
---
 greader-piper.el | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/greader-piper.el b/greader-piper.el
index baf82a98fc..a1d7cad68e 100644
--- a/greader-piper.el
+++ b/greader-piper.el
@@ -28,7 +28,8 @@
   :group 'greader)
 
 (defcustom greader-piper-script-path
-  (find-library-name "greader")
+  (file-name-concat (file-name-directory (find-library-name
+                                         "greader")) "piper.sh")
   "Piper script path."
   :type 'string)
 
@@ -36,6 +37,7 @@
   "https://gitlab.com/michelangelo-rodriguez/greader/-/raw/master/piper.sh";
   "Url of the script `piper.sh'."
   :type 'string)
+
 (defun greader-piper-find-script ()
   "Check if the piper script is really present.
 If the script is not present, propose to download it from gitlab.
@@ -49,8 +51,12 @@ Error."
   \"piper.sh\" from gitlab?")))
       (if answer
          (progn
-           (setq answer (call-process "curl" nil "*piper-script download*"
-                                      nil greader-piper-script-url))
+           (setq answer (call-process "curl" nil (list
+                                                  (get-buffer-create
+                                                   "*piper-script download*") 
"piper.err")
+                                      nil "-s" greader-piper-script-url))
+           (with-current-buffer "*piper-script download*"
+             (write-region (point-min) (point-max) greader-piper-script-path))
            (unless (file-exists-p greader-piper-script-path)
              (error "Error while downloading %s\nPlease try later or
 open an issue" greader-piper-script-url)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]