commit 264620731609f42e4e251ed7a836deb2fe24856c
Author: Arkadiusz Miƛkiewicz <ar...@maven.pl>
Date:   Mon Nov 12 18:21:36 2018 +0100

    Or just redirect error as getline reading is problematic with quotation.

 pldnotify.awk | 13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)
---
diff --git a/pldnotify.awk b/pldnotify.awk
index ff4a602..e0098f0 100755
--- a/pldnotify.awk
+++ b/pldnotify.awk
@@ -745,19 +745,10 @@ function jenkins_upgrade(name, ver, urls,  url, i, c, 
chunks, nver) {
 # check for update from release-monitoring.org
 function rmo_check(name,    sourceurl, cmd, ver) {
        sourceurl = "https://release-monitoring.org/api/project/pld-linux/"; name
-       cmd = "curl -m 45 -sf " sourceurl
+       cmd = "echo 'var data='\"$(curl -m 45 -sf " sourceurl "2> /dev/null || 
echo '{}')\"';if (data.version) process.stdout.write(data.version)' | node"
        d("rmo: " cmd);
-       dataall = ""
-       while (cmd | getline data) {
-               dataall = dataall "\n" data
-       }
+       cmd | getline ver
        close(cmd)
-       if (dataall) {
-               cmd = "echo 'var data='\"" dataall "\"';if (data.version) 
process.stdout.write(data.version)' | node"
-               d("rmo: " cmd);
-               cmd | getline ver
-               close(cmd)
-       }
 
        # strip vX.Y -> X.y
        sub("^v", "", ver)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/pldnotify.git/commitdiff/264620731609f42e4e251ed7a836deb2fe24856c

_______________________________________________
pld-cvs-commit mailing list
pld-cvs-commit@lists.pld-linux.org
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to