]> git.pld-linux.org Git - projects/distfiles.git/commitdiff
- use custom User-Agent, some sites refuse wget
authorJakub Bogusz <qboosh@pld-linux.org>
Sun, 16 Dec 2007 16:39:06 +0000 (16:39 +0000)
committercvs2git <feedback@pld-linux.org>
Thu, 29 Nov 2012 22:58:16 +0000 (22:58 +0000)
Changed files:
    file-fetcher.pl -> 1.45

file-fetcher.pl

index 8fd51b96b7a6bbe18931e829bd5c0ba410242c57..5f106f8e3fa40f3a2d77c52298a20ff52473b391 100644 (file)
@@ -10,6 +10,7 @@ $copy_dir = "src"; # relative to ftp root
 $no_url_dir = "./upload";
 $df_server = "distfiles.pld-linux.org";
 $df_scp = "plddist\@ep09.pld-linux.org:ftp";
+$user_agent = "PLD/distfiles"
 
 @md5 = ();
 @url = ();
@@ -220,8 +221,8 @@ sub fetch_file($$)
   my $all_out = "";
   my $bn = basename($url);
   my $local = "$tmp_dir/$md5/$bn";
-  my $cmd = "wget -nv --no-check-certificate -O $local \"$url\"";
-  my $cmd2 = "wget -nv --no-check-certificate --passive-ftp -O $local \"$url\"";
+  my $cmd = "wget -nv --no-check-certificate --user-agent=$user_agent -O $local \"$url\"";
+  my $cmd2 = "wget -nv --no-check-certificate --user-agent=$user_agent --passive-ftp -O $local \"$url\"";
 
   push @files, $bn;
 
This page took 0.114025 seconds and 4 git commands to generate.