multiple skip options can be passed by separating them by comma or whitespace
This commit is contained in:
parent
7ce6db0ca7
commit
18c1e9bbc5
1 changed files with 14 additions and 3 deletions
17
mmdebstrap
17
mmdebstrap
|
@ -4355,8 +4355,18 @@ sub main() {
|
|||
# here prepare for long suffering in dependency hell.
|
||||
'simulate' => \$options->{dryrun},
|
||||
'dry-run' => \$options->{dryrun},
|
||||
'skip=s@' => \$options->{skip},
|
||||
) or pod2usage(-exitval => 2, -verbose => 1);
|
||||
'skip=s' => sub {
|
||||
my ($opt_name, $opt_value) = @_;
|
||||
for my $skip (split /[,\s]+/, $opt_value) {
|
||||
# strip leading and trailing whitespace
|
||||
$skip =~ s/^\s+|\s+$//g;
|
||||
# skip if the remainder is an empty string
|
||||
if ($skip eq '') {
|
||||
next;
|
||||
}
|
||||
push @{ $options->{skip} }, $skip;
|
||||
}
|
||||
}) or pod2usage(-exitval => 2, -verbose => 1);
|
||||
|
||||
if (defined($logfile)) {
|
||||
open(STDERR, '>', $logfile) or error "cannot open $logfile: $!";
|
||||
|
@ -6278,7 +6288,8 @@ B<mmdebstrap> tries hard to implement sensible defaults and will try to stop
|
|||
you before shooting yourself in the foot. This option is for when you are sure
|
||||
you know what you are doing and allows one to skip certain actions and safety
|
||||
checks. See section B<OPERATION> for a list of possible arguments and their
|
||||
context.
|
||||
context. The option can be specified multiple times or you can separate
|
||||
multiple values by comma or whitespace.
|
||||
|
||||
=item B<-q,--quiet>, B<-s,--silent>
|
||||
|
||||
|
|
Loading…
Reference in a new issue