]> git.pld-linux.org Git - packages/rpm-build-tools.git/blobdiff - pldnotify.awk
- remove .gz from manfiles
[packages/rpm-build-tools.git] / pldnotify.awk
index 637bb141597d8d8d500910c49e5530ebd58fddb0..59bd2fefca15863e37e0005b76a0fc30b1e6cbc6 100644 (file)
@@ -1,5 +1,7 @@
 #!/bin/awk -f
 # $Revision$, $Date$
+# TODO: "SourceXDownload" support (use given URLs if present instead of cut-down SourceX URLs)
+
 function fixedsub(s1,s2,t,     ind) {
 # substitutes fixed strings (not regexps)
        if (ind = index(t,s1)) {
@@ -169,27 +171,30 @@ function get_links(url,   errno,link,oneline,retval,odp,tmpfile) {
                                        if (DEBUG) print "Ramka->: " newurl
                                }
                                retval=(retval " " get_links(newurl))
-                       } else if (tolower(odp) ~ /href=[ \t]*"[^"]+"/) {
+                       } else if (tolower(odp) ~ /href=[ \t]*"[^"]*"/) {
                                sub(/[hH][rR][eE][fF]=[ \t]*"/,"href=\"",odp)
-                               match(odp,/href="[^"]+"/)
+                               match(odp,/href="[^"]*"/)
                                link=substr(odp,RSTART,RLENGTH)
                                odp=substr(odp,1,RSTART) substr(odp,RSTART+RLENGTH)
                                link=substr(link,7,length(link)-7)
                                retval=(retval " " link)
-                       } else if (tolower(odp) ~ /href=[ \t]*'[^']+'/) {
+                               if (DEBUG) print "href(\"\"): " link
+                       } else if (tolower(odp) ~ /href=[ \t]*'[^']*'/) {
                                sub(/[hH][rR][eE][fF]=[ \t]*'/,"href='",odp)
-                               match(odp,/href='[^']+'/)
+                               match(odp,/href='[^']*'/)
                                link=substr(odp,RSTART,RLENGTH)
                                odp=substr(odp,1,RSTART) substr(odp,RSTART+RLENGTH)
                                link=substr(link,7,length(link)-7)
                                retval=(retval " " link)
-                       } else if (tolower(odp) ~ /href=[ \t]*[^ \t>]+/) {
+                               if (DEBUG) print "href(''): " link
+                       } else if (tolower(odp) ~ /href=[ \t]*[^ \t>]*/) {
                                sub(/[hH][rR][eE][fF]=[ \t]*/,"href=",odp)
-                               match(odp,/href=[^ \t>]+/)
+                               match(odp,/href=[^ \t>]*/)
                                link=substr(odp,RSTART,RLENGTH)
                                odp=substr(odp,1,RSTART) substr(odp,RSTART+RLENGTH)
                                link=substr(link,6,length(link)-5)
                                retval=(retval " " link)
+                               if (DEBUG) print "href(): " link
                        } else {
                                retval=(retval " INTERNAL_ERROR")
                                break
@@ -233,7 +238,7 @@ function find_mirror(url) {
                        if (prefix==origin){
                                if ( DEBUG ) print "Mirror znaleziony na " mname
                                close("mirrors")
-                               return mirror substr(url,length(origin))
+                               return mirror substr(url,length(origin)+1)
                        }
                }
        }
@@ -302,7 +307,7 @@ function process_source(number,lurl,name,version) {
                                newfilename=fixedsub(prever,"",newfilename)
                                newfilename=fixedsub(postver,"",newfilename)
                                if (DEBUG) print "Wersja: " newfilename
-                               if (newfilename ~ /\.(pkg|bin|binary)$/) continue
+                               if (newfilename ~ /\.(pkg|bin|binary|built)$/) continue
                                if (NUMERIC) {
                                        if ( compare_ver_dec(version, newfilename)==1 ) {
                                                if (DEBUG) print "Tak, jest nowa"
This page took 0.031445 seconds and 4 git commands to generate.