Larry
--- Menuconfig~ Tue Oct 29 07:38:17 1996
+++ Menuconfig Wed Jun 4 14:37:06 1997
@@ -20,6 +20,8 @@
# script.
#
# Please send comments / questions / bug fixes to roadcapw@cfw.com
+# 040697 Larry Augustin (lma@varesearch.com) - integer expr test
+# fails with GNU expr 1.15 or newer. Re-write to work with new or old expr.
#
#----------------------------------------------------------------------------
@@ -389,6 +391,12 @@
#
# Create a dialog for entering an integer into a kernel option.
#
+OLD_EXPR=`expr "0" : '0\?'`
+if [ $OLD_EXPR -eq 1 ]; then
+ INT_EXPR='0$\|-\?[1-9][0-9]*$'
+else
+ INT_EXPR='0$\|-?[1-9][0-9]*$'
+fi
function l_int () {
while true
do
@@ -400,7 +408,7 @@
answer="`cat MCdialog.out`"
answer="${answer:-$3}"
- if expr $answer : '0$\|-?[1-9][0-9]*$' >/dev/null
+ if expr $answer : $INT_EXPR >/dev/null
then
eval $2="$answer"
else