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: Thu Aug 11 18:55:35 UTC 2022
Modified Files:
pkgsrc/pkgtools/lintpkgsrc/files: lintpkgsrc.pl
Log Message:
lintpkgsrc: use proper exit status when showing usage
To generate a diff of this commit:
cvs rdiff -u -r1.75 -r1.76 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.75 pkgsrc/pkgtools/lintpkgsrc/files/lintpkgsrc.pl:1.76
--- pkgsrc/pkgtools/lintpkgsrc/files/lintpkgsrc.pl:1.75 Thu Aug 11 07:20:52 2022
+++ pkgsrc/pkgtools/lintpkgsrc/files/lintpkgsrc.pl Thu Aug 11 18:55:35 2022
@@ -1,6 +1,6 @@
#!@PERL5@
-# $NetBSD: lintpkgsrc.pl,v 1.75 2022/08/11 07:20:52 rillig Exp $
+# $NetBSD: lintpkgsrc.pl,v 1.76 2022/08/11 18:55:35 rillig Exp $
# Written by David Brownlee <abs%netbsd.org@localhost>.
#
@@ -1259,7 +1259,7 @@ sub store_pkgsrc_makefiles($db, $fname)
# Remember to update manual page when modifying option list
#
-sub usage_and_exit() {
+sub usage_and_exit($status) {
print "Usage: lintpkgsrc [opts] [makefiles]
opts:
-h : This help. [see lintpkgsrc(1) for more information]
@@ -1288,7 +1288,7 @@ Modifiers:
-D : Debug makefile and glob parsing
-L : List each Makefile when scanned
";
- exit;
+ exit $status;
}
# Could speed up by building a cache of package names to paths, then processing
@@ -1608,7 +1608,7 @@ sub main() {
!getopts('BDE:I:K:LM:OP:RSVdg:himopruyz', \%opt)
|| $opt{h}
|| !grep(/[BDEORSdgimopruyz]/, keys %opt)) {
- usage_and_exit();
+ usage_and_exit($opt{h} ? 0 : 1);
}
$| = 1;
Home |
Main Index |
Thread Index |
Old Index