mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Randy.Dunlap" <rddunlap@osdl.org>
To: lkml <linux-kernel@vger.kernel.org>
Cc: akpm <akpm@osdl.org>
Subject: [PATCH] update ikconfig generator script
Date: Tue, 22 Jun 2004 14:28:01 -0700	[thread overview]
Message-ID: <20040622142801.787c04fc.rddunlap@osdl.org> (raw)



http://bugme.osdl.org/show_bug.cgi?id=2701

Current script has problems with some shells and utilities.
Remove use of 'echo' in the script.

From: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Randy Dunlap <rddunlap@osdl.org>


Index: scripts/mkconfigs
===================================================================
RCS file: /home/other/cvs/linux/linux-2.6/scripts/mkconfigs,v
retrieving revision 1.1.1.3
diff -u -p -r1.1.1.3 mkconfigs
--- a/scripts/mkconfigs	29 Sep 2003 12:27:27 -0000	1.1.1.3
+++ b/scripts/mkconfigs	28 May 2004 11:12:33 -0000
@@ -34,10 +34,10 @@ fi
 config=$1
 makefile=$2
 
-echo "#ifndef _IKCONFIG_H"
-echo "#define _IKCONFIG_H"
-echo \
-"/*
+cat << EOF
+#ifndef _IKCONFIG_H
+#define _IKCONFIG_H
+/*
  * 
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -58,10 +58,10 @@ echo \
  * 
  * This file is generated automatically by scripts/mkconfigs. Do not edit.
  *
- */"
-
-echo "static char const ikconfig_config[] __attribute__((unused)) = "
-echo "\"CONFIG_BEGIN=n\\n\\"
-echo "`cat $config | sed 's/\"/\\\\\"/g' | grep "^#\? \?CONFIG_" | awk '{ print $0 "\\\\n\\\\" }' `"
-echo "CONFIG_END=n\\n\";"
-echo "#endif /* _IKCONFIG_H */"
+ */
+static char const ikconfig_config[] __attribute__((unused)) =
+"CONFIG_BEGIN=n\\n\\
+$(sed < $config -n 's/"/\\"/g;/^#\? \?CONFIG_/s/.*/&\\n\\/p')
+CONFIG_END=n\\n";
+#endif /* _IKCONFIG_H */
+EOF

                 reply	other threads:[~2004-06-22 21:34 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040622142801.787c04fc.rddunlap@osdl.org \
    --to=rddunlap@osdl.org \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®