#!/usr/local/bin/perl -w

use strict;
use Bootstrap;
use Getopt::Std;

my $grab_rpm_ver = '$Id: grab_rpm.pl,v 1.3 2001/08/17 20:16:42 sbi Exp $';

my %opt;

getopts("hr:", \%opt);

if ($#ARGV == -1 || $opt{h}) {
    print <<__EOTEXT__;
Usage: ./grab_rpm.pl [-h] [-r repository] <filenames +>

  -r: Specify repository to use

$grab_rpm_ver
$bootstrap_pm_ver
__EOTEXT__
    exit 1;
}

set_repository($opt{r} || guess_repository);

open_ftp;

foreach my $i (@ARGV) {
    get_rpm_package($i)
        or warn "$i not found\n";
}

close_ftp;
