#!/usr/bin/perl
use strict;

our $opt_url = "http://khack.osdl.org/stp";

foreach my $id (@ARGV) {
    if ($id !~ /^\d+$/) {
        warn "'$id' is not a valid id - must be digits only.  Skipping.\n";
        next;
    }

    print `wget -r -l inf -nH -np --cut-dirs=1 -R '*\\?*' "$opt_url/$id"`;
}


__END__

=head1 NAME

trget - retrieves a given test run's data files.

=head1 SYNOPSIS

trget ID [ ID [ ... ] ]

=head1 DESCRIPTION

B<trget> will retrieve the data files for a given test request's test
run and store them into a subdir in the current directory named as the
test run's ID number.  Skips arguments that are not numeric, issuing a 
warning.

This script is essentially just a wrapper around wget that pulls the
data from a URL.

=head1 OPTIONS

None

=head1 PREREQUISITES

B<wget>

=head1 SEE ALSO

B<WebService::TestSystem>

=head1 AUTHOR

Bryce Harrington E<lt>bryce@osdl.orgE<gt>

=head1 COPYRIGHT

Copyright (C) 2004 Bryce Harrington
All Rights Reserved.
This module is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.

=head1 REVISION

Revision: $Revision: 1.2 $

=cut



