README: clean up formatting

The README was mostly reStructuredText already.  Clean
it up so it is fully reStructuredText and produces a
nice output result.

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
POSIX portability

Replace non-portable sed commands with equivalents that
are POSIX compatible.

In particular s/.../\n/g is replaced with y/.../\n/,
s/.../\t/ is replaced with an explicit tab,
and use of \| is eliminated as it's not part of basic
regular expressions.

Add missing '-' file arguments to paste command.

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
Remove *.sh 'local' bashism

Use of the 'local' keyword inside functions in order
to reuse variables without affecting the variable's value
external to the function is not part of the POSIX sh
specification.

In some cases simply removing the 'local' statement is enough.

It other cases it is enough to simply change variable names
to not conflict with callers' names.  Recursive function
invocations, however, must use a subshell.

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
Build improvments

Support an optional config.mak file the same way the
Git build does by including it with -include and adding
it to .gitignore.  This way changes to the build can
be made persistent without needing to remember the exact
options that have been set and without making the output
of git describe "dirty".

Track changes to prefix and related variables and
automatically rebuild when necessary just like Git does.

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
Make tg -r remote ... work

When using tg -r remotename tg-sub-command, the dispatch
fails.  Add a missing cmd="$1" to make it work properly.

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
Fix precheck test

Adjust the precheck version test so that it is
insensitive to case, translation and suffixes that
may be present in the output of the `git version`
command.

Some versions of Git are known to output a version
that looks like 'git version n.n.n.n (foo foo)'.

Without this fix those versions of Git do not pass
the check even though they should if the n.n.n.n
part is sufficiently recent.

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
Bump version to 0.10

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>