This little patch modifies menuconfig so I can modify numeric fields
with Mastodon Linux, which uses BSD expr instead of GNU expr. BSD expr
(apparently because of BSD regex) handles ``|'' differently in a
:-expression than GNU expr does -- it uses a bare ``|'' to do
alternatives while GNU expr uses ``\|''. Both of them, however, treat
``|'' the same way when it's being used to separate expressions. This
patch restores (at least as far as I can test with GNU expr) harmony to
the menuconfig world.
____
david parsons \bi/ and keeps me from maintaining a code fork, which is
\/ double-plus good for my copious free time.
--- linux/scripts/Menuconfig.orig Sun Feb 20 20:13:10 2000
+++ linux/scripts/Menuconfig Sat Mar 11 08:49:14 2000
@@ -545,7 +545,7 @@
# Semantics of + and ? in GNU expr changed, so
# we avoid them:
- if expr "$answer" : '0$\|-[1-9][0-9]*$\|[1-9][0-9]*$' >/dev/null
+ if expr "$answer" : '0$' '|' "$answer" : '[1-9][0-9]*$' '|' "$answer" : '-[1-9][0-9]*$' >/dev/null
then
eval $2="$answer"
else
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Fri Apr 07 2000 - 21:00:13 EST