~ubuntu-branches/ubuntu/edgy/libwww-perl/edgy

« back to all changes in this revision

Viewing changes to bin/lwp-mirror

  • Committer: Bazaar Package Importer
  • Author(s): Jay Bonci
  • Date: 2005-02-13 18:45:32 UTC
  • mfrom: (2.1.2 hoary)
  • Revision ID: james.westby@ubuntu.com-20050213184532-67qvopi4wre3010u
Tags: 5.803-4
* Make GET/POST/HEAD symlinks (Closes: #294597)
* lwp-requests now honors -b when dumping links (Closes: #294595)
  - Thanks to giuseppe bonacci for the patch
* Moved symlinks to a libwww-perl.links file

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/perl -w
2
2
 
3
 
# $Id: lwp-mirror,v 2.0 2002/01/03 01:42:31 gisle Exp $
 
3
# $Id: lwp-mirror,v 2.3 2004/04/10 11:19:33 gisle Exp $
4
4
#
5
5
# Simple mirror utility using LWP
6
6
 
7
7
=head1 NAME
8
8
 
9
 
lwp-mirror - Simple mirror utility for WWW
 
9
lwp-mirror - Simple mirror utility
10
10
 
11
11
=head1 SYNOPSIS
12
12
 
24
24
is the time that the program will wait for response from the remote
25
25
server before it fails.  The default unit for the timeout value is
26
26
seconds.  You might append "m" or "h" to the timeout value to make it
27
 
minutes or hours, repectively.
 
27
minutes or hours, respectively.
28
28
 
29
29
Because this program is implemented using the LWP library, it only
30
30
supports the protocols that LWP supports.
47
47
$progname =~ s,.*/,,;  # use basename only
48
48
$progname =~ s/\.\w*$//; #strip extension if any
49
49
 
50
 
$VERSION = sprintf("%d.%02d", q$Revision: 2.0 $ =~ /(\d+)\.(\d+)/);
 
50
$VERSION = sprintf("%d.%02d", q$Revision: 2.3 $ =~ /(\d+)\.(\d+)/);
51
51
 
52
52
$opt_h = undef;  # print usage
53
53
$opt_v = undef;  # print version
87
87
 
88
88
if ($rc == 304) {
89
89
    print STDERR "$progname: $file is up to date\n"
90
 
} elsif (!is_success($rc)) {
 
90
}
 
91
elsif (!is_success($rc)) {
91
92
    print STDERR "$progname: $rc ", status_message($rc), "   ($url)\n";
92
93
    exit 1;
93
94
}