patch-2.1.43 linux/scripts/Configure

Next file: linux/scripts/header.tk
Previous file: linux/net/x25/af_x25.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.42/linux/scripts/Configure linux/scripts/Configure
@@ -363,6 +363,28 @@
 }
 
 #
+# define_string sets the value of a string argument
+#
+#	define_string define value
+#
+function define_string () {
+	echo "$1="'"'$2'"' >>$CONFIG
+	echo "#define $1 "'"'$2'"' >>$CONFIG_H
+	eval "$1=$2"
+}
+
+#
+# string processes a string argument
+#
+#	string question define default
+#
+function string () {
+	old=$(eval echo "\${$2}")
+	def=${old:-$3}
+	readln "$1 ($2) [$def] " "$def" "$old"
+	define_string "$2" "$ans"
+}
+#
 # choice processes a choice list (1-out-of-n)
 #
 #	choice question choice-list default

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov