aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 {