summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2006-02-17 16:29:24 +0000
committerOlivier Blin <oblin@mandriva.org>2006-02-17 16:29:24 +0000
commita7939986f4e7dfb54598123ab863068b424a5418 (patch)
tree248a897f28ac9107019a895a0473a5528c0ac928
parent59c99edd8b3b9fec92408575a333da2bc4ac15bb (diff)
downloaddrakx-backup-do-not-use-a7939986f4e7dfb54598123ab863068b424a5418.tar
drakx-backup-do-not-use-a7939986f4e7dfb54598123ab863068b424a5418.tar.gz
drakx-backup-do-not-use-a7939986f4e7dfb54598123ab863068b424a5418.tar.bz2
drakx-backup-do-not-use-a7939986f4e7dfb54598123ab863068b424a5418.tar.xz
drakx-backup-do-not-use-a7939986f4e7dfb54598123ab863068b424a5418.zip
add the all-regions option to proceed with all regions
-rwxr-xr-xtools/draklive19
1 files changed, 13 insertions, 6 deletions
diff --git a/tools/draklive b/tools/draklive
index 447ecaaec..c24bbab0e 100755
--- a/tools/draklive
+++ b/tools/draklive
@@ -847,6 +847,7 @@ GetOptions(
(map { $_->{name} => \$_->{to_run} } @actions),
"device:s" => sub { $live{media}{device} = $_[1] },
"region:s" => sub { $live{system}{region} = $_[1] },
+ "all-regions" => sub { $live{all_regions} = 1 },
"config:s" => sub {
my $path = $_[1];
#- don't use do(), since it can't see lexicals in the enclosing scope
@@ -861,16 +862,20 @@ if ($live{copy_wizard}) {
complete_config(\%live);
copy_wizard(\%live);
} else {
+ every { !$_->{to_run} } @actions and die 'nothing to do';
unless (keys(%live)) {
warn 'no live definition';
pod2usage();
}
- complete_config(\%live);
- every { !$_->{to_run} } @actions and die 'nothing to do';
- foreach (grep { $_->{to_run} } @actions) {
- print qq(* entering step "$_->{name}"\n);
- $_->{do}->(\%live, \%opts);
- print qq(* step "$_->{name}" done\n);
+ foreach my $region ($live{all_regions} ? (sort(keys %{$live{regions}})) : $live{system}{region}) {
+ $region and print qq(=== proceeding with region $region"\n);
+ $live{system}{region} = $region;
+ complete_config(\%live);
+ foreach (grep { $_->{to_run} } @actions) {
+ print qq(* entering step "$_->{name}"\n);
+ $_->{do}->(\%live, \%opts);
+ print qq(* step "$_->{name}" done\n);
+ }
}
}
@@ -907,8 +912,10 @@ draklive [options]
--post-install run post install only (rpms and patches installation)
--config <file> use this configuration file as live description
+
--region <region> use the matching set of langs
(from the regions configuration hash)
+ --all-regions proceed with all configured regions
--copy-wizard run the copy wizard