Browse Source

allow --task-packages to be given more than once

tags/2.07
Joey Hess 17 years ago
parent
commit
11ec2fad37
2 changed files with 10 additions and 6 deletions
  1. +8
    -6
      tasksel.pl
  2. +2
    -0
      tasksel.pod

+ 8
- 6
tasksel.pl View File

@@ -207,7 +207,7 @@ sub getopts {
Getopt::Long::Configure ("bundling");
if (! GetOptions(\%ret, "test|t", "required|r", "important|i",
"standard|s", "no-ui|n", "new-install", "list-tasks",
"task-packages=s")) {
"task-packages=s@")) {
usage();
exit(1);
}
@@ -233,11 +233,6 @@ my @aptitude_install;
my @tasks_to_install;
my %options=getopts();

if (exists $options{"task-packages"}) {
print "$_\n" foreach task_packages($options{"task-packages"});
exit(0);
}

if (@ARGV) {
if ($ARGV[0] eq "install") {
shift;
@@ -249,6 +244,13 @@ if (@ARGV) {
}
}

if (exists $options{"task-packages"}) {
foreach (@{$options{"task-packages"}}) {
print "$_\n" foreach task_packages($_);
}
exit(0);
}

my @tasks=map { hide_dependent_tasks($_) } map { task_test($_) }
grep { task_avail($_) } map { read_task_desc($_) }
list_task_descs();


+ 2
- 0
tasksel.pod View File

@@ -50,6 +50,8 @@ list on stdout the tasks that would be displayed in the tasksel intserface

lists on stdout the packages that are available and part of the given task

Note that this option may be given more than once.

=back

=head1 SEE ALSO


Loading…
Cancel
Save