In case we have a git clone from Linux that is accessed via cygwin git
the files executable status will be derived from the file content (shebang)
and won't match the git repo, leading to a initially dirty tree.
This can be worked around by setting "core.filemode=false", but let's try
to match the cygwin permissions with the in-repo permissions so this isn't
needed.
* Print MINGW_ARCH info when passing --help/-h
* Change behaviour when MINGW_ARCH isn't set
* Default to MSYSTEM if in a mingw environment
* Default to mingw64 otherwise (but warn)
* Print some feedback on what is getting built right away.
makepkg can take some time at the start and this makes
things clear right away.
The goal of the MINGW_ARCH change is to make it more likely to do the right thing by
default and to not special case any environment.
This has the potential of breaking existing users if MINGW_ARCH isn't set
and they want exactly "mingw32/mingw64" to be built like before. This will now build
only mingw64 if called in a msys environment and either mingw32/64 if called
in those environments.
To restore the old behavior set MINGW_ARCH="mingw64 mingw32" first.
* Fix various shellcheck issues; like for spaces in arguments etc
* Merge makepkg-clang into makepkg-mingw. No need to have an extra tool for starters.
MINGW_INSTALLS="clang32 clang64" will work now.
* Run makepkg in a new login shell for the right MSYSTEM. This reduces
the differences between running it in a msys shell vs a mingw shell,
see #2285