[packages/pldnotify] Mangle links like https://github.com/tmux/tmux/releases/download/... to https://github.com/tmux/tmux

arekm arekm at pld-linux.org
Sat May 7 11:55:44 CEST 2016


commit e90a29ab6338488fb21e0d34b0721bf68d5c7b56
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Sat May 7 11:55:38 2016 +0200

    Mangle links like https://github.com/tmux/tmux/releases/download/... to https://github.com/tmux/tmux/releases/

 pldnotify.awk | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/pldnotify.awk b/pldnotify.awk
index 6eb05f9..022484c 100755
--- a/pldnotify.awk
+++ b/pldnotify.awk
@@ -279,6 +279,10 @@ function get_links(url,filename,   errno,link,oneline,retval,odp,wholeodp,lowero
 		gsub("\/archive\/.*", "/tags", url)
 		d("github archive url, mangled url to: " url)
 
+	} else if (url ~ /^(http|https):\/\/github.com\/.*\/(.*)\/releases\/download\//) {
+		gsub("\/download\/.*", "/", url)
+		d("github download url, mangled url to: " url)
+
 	} else if (url ~ /^(http|https):\/\/bitbucket.org\/.*\/get\/.*/) {
 		# https://bitbucket.org/logilab/pylint/get/tip.tar.bz2 -> https://bitbucket.org/logilab/pylint/downloads
 		gsub("\/get\/.*", "/downloads", url)
================================================================

---- gitweb:

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



More information about the pld-cvs-commit mailing list