The info text for askYesNo was a problem. First, it involved a long,
complex, paragraph encoded as string on the command line. That's NEVER
a good idea. Secondly, it passed that string unprocessed to printf
(albeit printf(1) but still) as a format string. And third, there's no
way to manage line length when you're doing that.
The alternative is to put the strings in a here document. We then cat
the result between a couple of empty echo commands to create the
original output. This addresses all of the above issues, but creates a
new one: The info text follows the prompt, rather than the other way
around. Not the most elegant.
So … why do this at all, why not just echo the info text outside of the
function, particularly since the function only echoes it once no matter
how many times you give a bogus answer? Well, if at some point we
decide to implement a dialog-type interface (whiptail, zenity, whatever
you prefer), then it becomes easy to do so. Unsure that's desirable at
this time, but options are good.
Reflowed the scripts (mostly) according to vim's autoindent engine.
Also added vim modelines so that people who are familiar with them can
configure their environment for A2SERVER's conventions. Also removed
trailing whitespace from lines and files while I was at it to make git
happier about various things.
An unusual quirk of git is that it tends not to like trailing whitespace
at the end of lines, and trailing blank lines at the end of a file. It
messes with the word diffs a bit I think. Anyway, it's easily removed,
so I've removed it.
This is perhaps less than ideal, but it should make the scripts work in
any web directory you put the repository into. As such, this should be
considered part of the "initial state" trying to match Ivan's current
non-SCM setup. We can adjust this later if he does something different
on his end.