Skip to content

Commit

Permalink
lintpkgsrc: condense code for checking mandatory command line options
Browse files Browse the repository at this point in the history
  • Loading branch information
rillig committed Jul 30, 2022
1 parent d1b9876 commit 32b67e4
Showing 1 changed file with 2 additions and 17 deletions.
19 changes: 2 additions & 17 deletions pkgtools/lintpkgsrc/files/lintpkgsrc.pl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!@PERL5@

# $NetBSD: lintpkgsrc.pl,v 1.40 2022/07/30 17:06:29 rillig Exp $
# $NetBSD: lintpkgsrc.pl,v 1.41 2022/07/30 17:30:47 rillig Exp $

# Written by David Brownlee <abs@netbsd.org>.
#
Expand Down Expand Up @@ -1485,22 +1485,7 @@ ()
if (
!getopts('BDE:I:K:LM:OP:RSVdg:himopruyz', \%opt)
|| $opt{h}
|| !(defined $opt{d}
|| defined $opt{g}
|| defined $opt{i}
|| defined $opt{m}
|| defined $opt{o}
|| defined $opt{p}
|| defined $opt{r}
|| defined $opt{u}
|| defined $opt{B}
|| defined $opt{D}
|| defined $opt{R}
|| defined $opt{O}
|| defined $opt{S}
|| defined $opt{E}
|| defined $opt{y}
|| defined $opt{z})) {
|| !grep(/[BDEORSdgimopruyz]/, keys %opt)) {
usage_and_exit();
}
$| = 1;
Expand Down

0 comments on commit 32b67e4

Please sign in to comment.