diff options
author | Jakub Bogusz | 2007-12-16 16:39:06 (GMT) |
---|---|---|
committer | cvs2git | 2012-11-29 22:58:16 (GMT) |
commit | 8f58f574336d3891e95de79d7476fc2b7b1dc65f (patch) | |
tree | 61ae8876d5398b112e575ecb0c43f08eae67705d | |
parent | 2ae8fdec5bcdbbb8b86755a926f4b498383c8f1c (diff) | |
download | distfiles-8f58f574336d3891e95de79d7476fc2b7b1dc65f.zip distfiles-8f58f574336d3891e95de79d7476fc2b7b1dc65f.tar.gz |
- use custom User-Agent, some sites refuse wget
Changed files:
file-fetcher.pl -> 1.45
-rw-r--r-- | file-fetcher.pl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/file-fetcher.pl b/file-fetcher.pl index 8fd51b9..5f106f8 100644 --- a/file-fetcher.pl +++ b/file-fetcher.pl @@ -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; |