[packages/pldnotify] Silence curl errors for release-monitoring.org.
arekm
arekm at pld-linux.org
Mon Nov 12 17:57:38 CET 2018
commit 1ceae5023d2d9ba5d179ff1437d034953e128f9d
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Mon Nov 12 17:57:23 2018 +0100
Silence curl errors for release-monitoring.org.
pldnotify.awk | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/pldnotify.awk b/pldnotify.awk
index 0bdfc75..728b0f4 100755
--- a/pldnotify.awk
+++ b/pldnotify.awk
@@ -745,10 +745,16 @@ 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 = "echo 'var data='\"$(curl -m 45 -sSf " sourceurl " || echo '{}')\"';if (data.version) process.stdout.write(data.version)' | node"
+ cmd = "curl -m 45 -sf " sourceurl
d("rmo: " cmd);
- cmd | getline ver
+ cmd | getline data
close(cmd)
+ if (data) {
+ cmd = "echo 'var data='\"" data "\"';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/1ceae5023d2d9ba5d179ff1437d034953e128f9d
More information about the pld-cvs-commit
mailing list