]> git.pld-linux.org Git - packages/rpm-build-tools.git/blobdiff - pldnotify.awk
get specname only (like in create_git_repo() above)
[packages/rpm-build-tools.git] / pldnotify.awk
old mode 100644 (file)
new mode 100755 (executable)
index 265a768..168ca93
@@ -1,7 +1,7 @@
 #!/bin/awk -f
 # $Revision$, $Date$
 #
-# Copyright (C) 2000-2010 PLD-Team <feedback@pld-linux.org>
+# Copyright (C) 2000-2011 PLD-Team <feedback@pld-linux.org>
 # Authors:
 #      Sebastian Zagrodzki <zagrodzki@pld-linux.org>
 #      Jacek Konieczny <jajcus@pld-linux.org>
@@ -272,6 +272,11 @@ function get_links(url,filename,   errno,link,oneline,retval,odp,wholeodp,lowero
                d("cgit snapshot tarball url, mungled url to: " url)
        }
 
+       if (url ~/^(http|https):\/\/www2\.aquamaniac\.de\/sites\/download\//) {
+               url = "http://www2.aquamaniac.de/sites/download/packages.php"
+               d("aquamaniac.de tarball url, mungled url to: " url)
+       }
+
        d("Retrieving: " url)
        user_agent = "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2) Gecko/20100129 PLD/3.0 (Th) Iceweasel/3.6"
        cmd = "wget -t 2 -T 45 --user-agent \"" user_agent "\" -nv -O - \"" url "\" --passive-ftp --no-check-certificate > " tmpfile " 2> " tmpfileerr
@@ -373,7 +378,12 @@ if (USE_PERL) {
                                continue
                        }
 
-                       retval = (retval " " link)
+                       # link ends with at least 2 digit version
+                       mlink = ""
+                       if (link ~ /^.*\/[v]*[0-9\.]+[0-9]\/$/)
+                               mlink = get_links(link)
+
+                       retval = (retval " " link " " mlink)
                        d("href(\"\"): " link)
                } else if (lowerodp ~ /href=[ \t]*'[^']*'/) {
                        sub(/[hH][rR][eE][fF]=[ \t]*'/,"href='",odp)
@@ -445,7 +455,7 @@ function find_mirror(url) {
                        mname=fields[3]
                        prefix=substr(url,1,length(origin))
                        if (prefix==origin){
-                               d("Mirror fount at " mname)
+                               d("Mirror found at " mname)
                                close("mirrors")
                                return mirror substr(url,length(origin)+1)
                        }
@@ -682,6 +692,7 @@ FNR==1 {
        FNAME=FILENAME
        DEFS["_alt_kernel"]=""
        DEFS["20"]="\\ "
+       DEFS["nil"]=""
 }
 
 /^[Uu][Rr][Ll]:/&&(URL=="") { URL=subst_defines($2,DEFS) ; DEFS["url"]=URL }
This page took 0.029521 seconds and 4 git commands to generate.