2
|
1 #!/usr/bin/perl
|
|
2 use strict;
|
|
3
|
5
|
4
|
|
5
|
2
|
6 use IMPL::require {
|
|
7 Repository => 'Yours::Model::Repository',
|
|
8 Sync => 'Yours::SyncRepository',
|
|
9 Dumper => 'Data::Dumper',
|
|
10
|
|
11 };
|
|
12
|
|
13 my @repos = (
|
|
14 {
|
5
|
15 name => 'update',
|
|
16 dir => '_data/update',
|
|
17 location => 'http://mirror.yandex.ru/opensuse/update/12.3/',
|
|
18 },
|
|
19 {
|
2
|
20 name => 'gnome',
|
5
|
21 dir => '_data/gnome',
|
2
|
22 location => 'http://download.opensuse.org/repositories/GNOME:/STABLE:/3.8/openSUSE_12.3/'
|
3
|
23 },
|
|
24 {
|
|
25 name => 'mono',
|
5
|
26 dir => '_data/mono',
|
3
|
27 location => 'http://download.opensuse.org/repositories/Mono/openSUSE_12.3/'
|
|
28 },
|
|
29 {
|
|
30 name => 'nvidia',
|
5
|
31 dir => '_data/nvidia',
|
3
|
32 location => 'ftp://download.nvidia.com/opensuse/12.3/'
|
4
|
33 },
|
|
34 {
|
|
35 name => 'broken',
|
5
|
36 dir => '_data/broken',
|
4
|
37 location => 'http://mirror.yandex.ru/opensuse/repositories/KDE:/Extra/KDE_Release_410_openSUSE_12.3/'
|
2
|
38 }
|
|
39 );
|
|
40
|
|
41 foreach my $info ( @repos ) {
|
|
42 eval {
|
|
43 my $repo = Repository->new( map $info->{$_},qw(name dir location));
|
|
44 Sync
|
3
|
45 ->new({
|
|
46 log => *STDOUT,
|
|
47 skipDebug => 1,
|
|
48 skipSrc => 1
|
|
49 })
|
2
|
50 ->Update($repo);
|
|
51 };
|
5
|
52 if($@) {
|
|
53 warn $@;
|
3
|
54 } else {
|
|
55 print "done\n";
|
|
56 }
|
2
|
57 }
|
|
58
|
|
59
|
3
|
60 print "ALL TASKS COMPLETE\n"; |