aboutsummaryrefslogtreecommitdiffstats
path: root/emi
blob: f415e4c7c8720485680e958d638ca29db4bb14f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/usr/bin/perl
#
# Copyright (C) 2005,2006 Mandriva
# 
# Author: Florent Villard <warly@mandriva.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# upload packages in queue when all the mandatory architectures are done
#
# TODO
# 
# - take the packages in done/ and upload them with youri in queue/
# - check that the mandatory architectures are present
#

use strict;
use Iurt::Config qw(config_usage get_date);
my $program_name = 'emi';

my %run;
open(my $LOG, ">&STDERR");
$run{LOG} = $LOG;
my $HOME = $ENV{HOME};

my $configfile = "$HOME/.emi.conf";

my $config;
if (-f $configfile) {
    $config = do $configfile or die "FATAL $program_name: syntax error in $configfile";
} else {
    $config = {}
}

my %config_usage = ( 
    arch => {  
	desc => "List of arch",
	default => [ 'i586', 'x86_64', 'ppc' , 'sparc', 'sparc64' ],
         },
    mandatory_arch => {
	desc => 'List of mandatory architecture to be able to upload',
	default => { i596 => 1, x86_64 => 1 },
      },
   tmp => { desc => "Temporary directory",  default => "$HOME/tmp/"},
);
config_usage(\%config_usage, $config) if $run{config_usage};

print {$run{LOG}} "$program_name\n";

exit