bagder: curl-www/dl remcheck.pl,1.7,1.8

[email protected]
Newsgroups gmane.comp.web.curl.www.cvs
Message-ID <[email protected]>
Update of /cvsroot/curl/curl-www/dl
In directory labb:/tmp/cvs-serv18740

Modified Files:
	remcheck.pl 
Log Message:
update the download URL if a newer version is found and version is embedded
in the check URL


Index: remcheck.pl
===================================================================
RCS file: /cvsroot/curl/curl-www/dl/remcheck.pl,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- remcheck.pl	10 May 2005 12:41:17 -0000	1.7
+++ remcheck.pl	10 May 2005 22:11:44 -0000	1.8
@@ -190,6 +190,12 @@
                         $update++;
                         logmsg " NEWER version found!\n";
                         $$ref{'curl'}=$r;
+                        if($versionembedded) {
+                            # the version string is embedded in the test URL
+                            # so we update the download URL as well!
+                            $$ref{'file'}=$churl;
+                            logmsg " Updated download URL!\n";
+                        }
                     }
                     else {
                         $uptodate++;
@@ -222,6 +228,13 @@
                     
                     logmsg " Retry with version $ver: \"$churl\"\n";
                     @data = geturl($churl);
+
+                    if($ver eq $$ref{'curl'}) {
+                        # no need to scan for older packages than what we
+                        # already have
+                        logmsg " Ending scan here, $ver is database version\n";
+                        last;
+                    }
                 }
             }
 
@@ -240,6 +253,12 @@
                 $update++;
                 logmsg " NEWER version found!\n";
                 $$ref{'curl'} = $ver;
+                if($versionembedded) {
+                    # the version string is embedded in the test URL
+                    # so we update the download URL as well!
+                    $$ref{'file'}=$churl;
+                    logmsg " Updated download URL!\n";
+                }
             }
             else {
                 $uptodate++;
@@ -264,8 +283,6 @@
 if($update) {
     # one or more updated entries, save!
     $db->save();
-    logmsg "$update update found\n";
-}
-else {
-    logmsg "Nothing was updated\n";
 }
+logmsg "$update packages updated\n";
+

_______________________________________________
http://cool.haxx.se/mailman/listinfo/curl-www-commits
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.