# old pre-git ChangeLog:

# 0.5.2 20220702 bkw: if SlackBuild doesn't exist, skip other checks.

# 0.5.1 20220702 bkw: only check junk files if checking a tarball.

# 20220513 bkw: starting with 0.5, moved to sbo-maintainer-tools repo.

# 0.4 20220314 bkw: add -a option to check all builds in the git repo.

# 0.3 20200420 bkw:
# - Check github URLs for validity.

# 0.2 20200103 bkw:
# - Use "git rev-parse" to decide if we're in a git repo, because
#   "git status" traverses the whole repo looking for untracked files.
#   It does this even if you use -uno (it won't *print* the untracked
#   files, but it still searches for them). Thanks to alienBOB for cluing
#   me in to using rev-parse for this.
# - Skip the junkfiles check when we're in a git repo. It's more
#   annoying than it is useful.
# - Allow possible -e/-u arguments in the shebang.
# - Avoid false positives when the script does a "cd $PKG" and then
#   uses relative paths for install/*.
# - Require VERSION= to appear within the first 10 non-comment/non-blank
#   lines, and don't check it anywhere else in the script.
# - Allow scripts to skip lint checks via ###sbolint on/off comments.

# 0.1 20141114 bkw, Initial release.

# This script is meant to be fairly self-contained, prefer not to
# require a huge pile of perl module dependencies. In some cases this
# means using system() or backticks or such (e.g. to run tar, instead of
# using Archive::Tar). Please don't "improve" the script by using a ton
# of modules. The POSIX module ships with perl, not afraid of using that.

# future options:
# -l list packages with errs/warnings, don't give details
# possibly some way to selectively disable the checks (does anyone
# really need this?)

# future ideas for checks:
# - REQUIRES= packages have to exist? annoying if you're working on a batch
#   of stuff to be submitted together.
# - Validate images, e.g. icon.png or .xpm or such. ImageMagick's identify
#   command can tell a non-image or a wrong-format image (a .jpg filename
#   that's actually a PNG image), but it doesn't detect truncated images.
#   Also we have to parse its stdout/stderr, it returns 0.
