chiark / gitweb /
keyfunc.sh.in: Make sure we can match the `0' string.
authorMark Wooding <mdw@distorted.org.uk>
Wed, 19 Sep 2012 23:59:16 +0000 (00:59 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Thu, 20 Sep 2012 00:10:17 +0000 (01:10 +0100)
commitec3628d8dbd4d112033b4ca79c296ad570222a22
tree71dfbcae52168a6d7ad4b43965aca4dee7eda2f1
parent1581d63e281564dbd7889f911773c862c80f04fc
keyfunc.sh.in: Make sure we can match the `0' string.

The expr(1) tool exits with status 1 if its output is zero.  The `:'
operator evaluates to the substring matched by the outermost parentheses
in the pattern, if there are any.  Therefore, matching `0' against the
`R_NUMERIC' pattern always appears to fail.  Fix this and similar problems
by adding extra parens around the entire pattern, including the leading
sentinel `Q'.
keyfunc.sh.in