commit e90a29ab6338488fb21e0d34b0721bf68d5c7b56
Author: Arkadiusz Miƛkiewicz <[email protected]>
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

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to