pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/pkgtools/lintpkgsrc/files



Module Name:    pkgsrc
Committed By:   rillig
Date:           Sat Jul 30 17:30:47 UTC 2022

Modified Files:
        pkgsrc/pkgtools/lintpkgsrc/files: lintpkgsrc.pl

Log Message:
lintpkgsrc: condense code for checking mandatory command line options


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 pkgsrc/pkgtools/lintpkgsrc/files/lintpkgsrc.pl

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/pkgtools/lintpkgsrc/files/lintpkgsrc.pl
diff -u pkgsrc/pkgtools/lintpkgsrc/files/lintpkgsrc.pl:1.40 pkgsrc/pkgtools/lintpkgsrc/files/lintpkgsrc.pl:1.41
--- pkgsrc/pkgtools/lintpkgsrc/files/lintpkgsrc.pl:1.40 Sat Jul 30 17:06:29 2022
+++ pkgsrc/pkgtools/lintpkgsrc/files/lintpkgsrc.pl      Sat Jul 30 17:30:47 2022
@@ -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@localhost>.
 #
@@ -1485,22 +1485,7 @@ sub main() {
        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;



Home | Main Index | Thread Index | Old Index