4 |
# is free software; you can redistribute it and/or modify it under the |
# is free software; you can redistribute it and/or modify it under the |
5 |
# same terms as Perl itself. |
# same terms as Perl itself. |
6 |
# |
# |
7 |
# $Id: update_rpms_dir,v 1.7 2006/02/08 04:04:48 gordonr Exp $ |
# $Id: update_rpms_dir,v 1.9 2006/02/12 05:06:41 gordonr Exp $ |
8 |
# |
# |
9 |
# Update RPMS directory with the latest from a given list of directories |
# Update RPMS directory with the latest from a given list of directories |
10 |
|
|
19 |
|
|
20 |
my $rpms_dir = $opt{rpms_dir} || "/builds/RPMS"; |
my $rpms_dir = $opt{rpms_dir} || "/builds/RPMS"; |
21 |
|
|
22 |
warn "Using $rpms_dir\n" if $opt{debug}; |
warn "Using $rpms_dir\n" if $opt{verbose}; |
23 |
|
|
24 |
my @repositories = qw( |
my @repositories = qw( |
25 |
/builds/rpms/RPMS/i386/ |
/builds/rpms/RPMS/i386/ |
45 |
if ($newest) |
if ($newest) |
46 |
{ |
{ |
47 |
# XXX - FIXME - Should we try other repos, or stop here? |
# XXX - FIXME - Should we try other repos, or stop here? |
48 |
warn "rm $rpms_dir/$file; cp -p $dir/$newest $rpms_dir\n" |
print "rm $rpms_dir/$file; cp -p $dir/$newest $rpms_dir\n" |
49 |
} |
} |
50 |
} |
} |
51 |
} |
} |