When the debian developers come ringing for a tagged release, suddenly
everything goes really fast.
In the build environment `ncurses5-config --libs` also returns
-ltinfo, which is unavailable to the linker. That's why the patch was
needed. Is this something that could be fixed in the build environment
or is this simply a badly written makefile, unsuitable for cross
compiling?
- Put everything into shell functions.
- Start fixing shellcheck warnings.
- Run a hostbuild before setting up an android toolchain (fixes#657).
It was quite a hasty rewrite, so things could be broken. Let me know!