aboutsummaryrefslogtreecommitdiff
path: root/sbolint
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2023-05-19 05:17:18 -0400
committerB. Watson <urchlay@slackware.uk>2023-05-19 05:17:18 -0400
commit94e5836ebad7360e75267eadce640cec297daad8 (patch)
tree4d9afb1d0152839171203d612073ac22024a0d6d /sbolint
parent7c95ef5f82ec2eeb6eba72038a3aae1af0644f86 (diff)
downloadsbo-maintainer-tools-94e5836ebad7360e75267eadce640cec297daad8.tar.gz
sbolint: get rid of short help (--help now same as --doc).
Diffstat (limited to 'sbolint')
-rwxr-xr-xsbolint42
1 files changed, 2 insertions, 40 deletions
diff --git a/sbolint b/sbolint
index e178983..d418d5a 100755
--- a/sbolint
+++ b/sbolint
@@ -364,11 +364,10 @@ while(@ARGV && ($ARGV[0] =~ /^-/)) {
$opt =~ /^-d/ && do { $url_download = 1; next; };
$opt =~ /^--?q(uiet)?/ && do { $quiet = 1; next; };
$opt =~ /^-$/ && do { $stdin = 1; next; };
- $opt =~ /^--?h(elp)?/ && do { usage(); exit 0; };
$opt =~ /^--?ver(sion)?/ && do { print "$VERSION\n"; exit 0; };
$opt =~ /^-n$/ && do { $nowarn = 1; next; };
$opt =~ /^-r$/ && do { $suppress_readme_len = 1; next; };
- $opt =~ /^--doc$/ && do { exec("perldoc $0"); };
+ $opt =~ /^(?:--doc|-?-h(elp)?)$/ && do { exec("perldoc $0"); };
$opt =~ /^--man$/ && do { exec("pod2man --stderr -s1 -cSBoStuff -r$VERSION $0"); };
$opt =~ /^-c|--colou?r(?:=[y|a]|$)/ && do { $color_output = 1; next; };
$opt =~ /^-m|--colou?r=n|--no-colou?r/ && do { $color_output = 0; next; };
@@ -483,45 +482,8 @@ sub log_note {
logmsg($green . "NOTE" . $color_off, @_);
}
-sub usage {
- if(@_) {
- warn "$SELF: $_\n" for @_;
- }
-
- warn <<EOF;
-
-$SELF v$VERSION - check SlackBuilds.org scripts for common problems.
-
-Usage: $SELF [-q] [-u] [-n] [-r] [-c | -m] <build <build ...>>
-Usage: $SELF --help | --man
-
-builds may be directories or tarballs. If no build arguments given,
-. (current directory) is assumed. Use - to read a list of tarballs/dirs
-from stdin.
-
-Options:
-
--a Lint all builds in the git repo.
--q Quiet: only emit errors/warnings, no 'checks out OK' or totals.
--u URL Check: use HTTP HEAD request to verify download/homepage URLs exist.
--n Suppress warnings, log only errors.
--r Suppress warning about README lines being too long.
--c Always use color, even if stdout is not a tty.
--m Do not use color, even if stdout is a tty.
---doc See the full documentation, in your pager.
---man Convert the full documentation to a man page, on stdout.
-
-Do not bundle options (say "-q -r", not "-qr").
-
-See the full documentation for more details.
-EOF
-# not yet:
-#-d URL Download: as -u, plus download & check md5sums of download URLs.
-}
-
sub die_usage {
- usage(@_);
- exit 1;
+ die "$SELF: $_[0] (try --help)\n"
}
sub chdir_or_die {