#!/usr/bin/perl # # Copyright (C) 2005,2006 Mandriva # # Author: Florent Villard # # 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