Re: [patch] v1.01 of /proc/.config (ready to eat)

david parsons (o.r.c@p.e.l.l.p.o.r.t.l.a.n.d.o.r.u.s)
13 Mar 1999 15:21:15 -0800


In article <linux.kernel.Pine.LNX.4.04.9903131653110.31100-100000@redhat1.mmaero.com>,
<jlewis@lewis.org> wrote:
>Why are you even using /tmp files?
>
>#!/bin/sh
>
>echo -e "/* DO NOT EDIT: Automatically generated by scripts/mkdconfig.sh */\n" >./kernel/dconfig_buf.c
>echo -en "static char *dconfig_buf = \n\"" >> ./kernel/dconfig_buf.c
>cat .config >> ./kernel/dconfig_buf.c
>echo "\";" >> ./kernel/dconfig_buf.c

Dropping newlines into the string may be permissable, but it's
kind of icky.

FILE=kernel/dconfig_buf.c
echo '/* DO NOT EDIT: Automatically generated by scripts/mkdconfig.sh */' >$FILE
PREFIX='static char *dconfig_buf = '
while read line; do \
echo "$PREFIX"'"'"$line"'\\n"'; \
PREFIX=' '; \
done < .config >> $FILE
echo '/* Go home, there's nothing more to see here */;' >> $FILE

____
david parsons \bi/ still using the 2.0.28 /proc/config.gz patch
\/

-
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/