Commit Graph

14 Commits

Author SHA1 Message Date
T. Joseph Carter
8caea62d2d Always output version, and only do it once 2015-10-16 20:10:10 -07:00
T. Joseph Carter
3bca3a12b4 Fix askYesNo function breakage
Paper bag time.  If you redirect stdin and read it, you have no stdin to
answer the question asked.  *facepalm*  What was I thinking?
2015-10-12 16:56:43 -07:00
T. Joseph Carter
c7800207f3 Merge branch 'master' of https://github.com/rasppleii/a2server 2015-10-12 15:25:50 -07:00
T. Joseph Carter
dda5694dca More overzealous ${scriptURL} fixing 2015-10-12 12:30:17 -07:00
T. Joseph Carter
63d4ce2b51 Make askYesNo use a here document for info text
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.
2015-10-12 02:59:42 -07:00
T. Joseph Carter
eceac43f7b Merge branch 'master' of https://github.com/rasppleii/a2server 2015-10-09 06:12:42 -07:00
T. Joseph Carter
f95c1fcc08 Merge branch 'master' of https://github.com/rasppleii/a2server 2015-10-09 05:52:17 -07:00
T. Joseph Carter
13ad54c876 Reflowed shell scripts—breaks outstanding PRs
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.
2015-10-09 05:29:32 -07:00
T. Joseph Carter
89015fc18e Add yes/no prompt function
This is mostly a "pretty interface" thing, and it currently only affects
the setup script.
2015-10-08 14:07:46 -07:00
T. Joseph Carter
c9e0345497 Change autoAnswerYes to autoAnswerDefault
This should allow questions to be created whose default is no without
convoluted asking of the opposite question.
2015-10-08 12:51:54 -07:00
T. Joseph Carter
9601ed3e14 Remove trailing whitespace
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.
2015-10-05 23:52:43 -07:00
T. Joseph Carter
616a384815 Bump version to 1.25
End-user functionality has changed warranting a version bump when these
changes are released.
2015-10-04 08:00:24 -07:00
T. Joseph Carter
eb6c0ede94 Merge branch 'master' of https://github.com/rasppleii/a2server 2015-10-04 07:20:49 -07:00
T. Joseph Carter
42aba9c1d0 Rename setup/update scripts
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.
2015-10-04 07:16:33 -07:00