A new version of `shellcheck` (I think?) brought us so new warnings and
errors.
To fix:
- pass `--source-path` so we don't need to stop `shellcheck` trying to
read sourced files every time
- disable some more warnings/errors we don't care about fixing
Note that the `HOMEBREW_FORCE_BREWED_` vars are automatically set if the system `git` and `curl` are too old. Drop mention of `HOMEBREW_GIT` which isn't user-settable.
Since #4748 `HOMEBREW_GIT` is set by the `brew.sh`, whose value is default to be `git`.
As a result, it completely bypasses the logic of the shims/scm/git.
This fixes the issue by checking whether `HOMEBREW_GIT` and
`HOMEBREW_SVN` are set to be `git` and `svn` respectively.
Fixes#4825.
Search for brewed git in both locations:
$HOMEBREW_PREFIX/Homebrew/Library/Homebrew/shims/scm/../../../../../bin/git
$HOMEBREW_PREFIX/Library/Homebrew/shims/scm/../../../../bin/git
- only document HOMEBREW_* variables in the manpage (although still
read from all the original environment variables).
- resort manpage environment variables in alphabetical order
- check the original path for trailing slashes
On older versions of OS X (i.e. pre-Mavericks) `xcode-select` is not
required to be set when using the CLT. Fix this behaviour so `brew
update` doesn't tell everyone on that configuration to `brew install
git`.
Move some stuff formerly in `Library/ENV` around:
- Move `Library/ENV/$XCODE_VERSION` to `Library/Homebrew/env/super` as they are
all superenv wrappers and all symlinks to the same version. We never needed
the "separate shims for separate versions" functionality and it just adds
confusion.
- Move `Library/ENV/pkgconfig` to `Library/Homebrew/env/pkgconfig` to get more
things under `Library/Homebrew`
- Move `Library/ENV/scm` to `Library/scm` as these wrappers are not actually
used by or related to superenv (or stdenv) in any way.