
config/mkconfig: Don't choke on kernel versions containing dashes (e.g.: linux-2.5.74-uc0)

Patch submitted by Bernardo Innocenti <bernie@develer.com>


diff -u -3 -p -r1.1.1.6 mkconfig
--- config/mkconfig	28 Feb 2003 22:43:46 -0000	1.1.1.6
+++ config/mkconfig	3 Jul 2003 07:44:10 -0000
@@ -59,14 +59,14 @@ if [ ${NKERNELS} -gt 1 ]; then
 	echo -n "choice 'Kernel Version' \""
 	for i in ${KERNELS}; do
 		VER=${i##linux-}
-		CFG="CONFIG_DEFAULTS_KERNEL_`echo ${VER%%.x}|sed -e 's/\./_/'`"
+		CFG="CONFIG_DEFAULTS_KERNEL_`echo ${VER%%.x}|sed -e 's/[-\.]/_/g'`"
 		DEF="linux-${VER}"
 		echo "${DEF} ${CFG} \\"
 	done
 	echo "\" $DEF"
 elif [ ${NKERNELS} -eq 1 ]; then
 	VER=${KERNELS##linux-}
-	CFG="CONFIG_DEFAULTS_KERNEL_`echo ${VER%%.x}|sed -e 's/\./_/'`"
+	CFG="CONFIG_DEFAULTS_KERNEL_`echo ${VER%%.x}|sed -e 's/[-\.]/_/g'`"
 	echo "comment 'Kernel is linux-${VER}'"
 	echo "define_bool ${CFG} y"
 else
