aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-02-04 02:38:21 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-02-04 02:38:21 +0000
commit45854b5e3ff265c23dc36c139f09ea8eb3790ad1 (patch)
tree65e35f8e209d94063a1d2ddfe9b8df5053b18f56
parent9f85de1821de853b6d4c413273a4467df50b96f6 (diff)
downloadbusybox-45854b5e3ff265c23dc36c139f09ea8eb3790ad1.tar.gz
mkconfigs: remove echo "`...`" contortion
-rwxr-xr-xscripts/mkconfigs21
1 files changed, 10 insertions, 11 deletions
diff --git a/scripts/mkconfigs b/scripts/mkconfigs
index 737ccb428..d212ad408 100755
--- a/scripts/mkconfigs
+++ b/scripts/mkconfigs
@@ -21,21 +21,21 @@
#
# Busybox version by Matteo Croce <3297627799 at wind.it>
#
-# Rules to generate bbconfig.h from .config:
+# Rules to generate bbconfigopts.h from .config:
# - Retain lines that begin with "CONFIG_"
# - Retain lines that begin with "# CONFIG_"
# - lines that use double-quotes must \\-escape-quote them
+config="$1"
if [ $# -lt 1 ]
then
config=.config
-else config=$1
fi
-echo "#ifndef _BBCONFIGOPTS_H"
-echo "#define _BBCONFIGOPTS_H"
-echo \
-"/*
+echo "\
+#ifndef _BBCONFIGOPTS_H
+#define _BBCONFIGOPTS_H
+/*
* busybox configuration settings.
*
* Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
@@ -43,11 +43,10 @@ echo \
* This file is generated automatically by scripts/mkconfigs.
* Do not edit.
*
- */"
+ */
+static const char * const bbconfig_config ="
+
+sed 's/\"/\\\"/g' $config | grep "^#\? \?CONFIG_" | awk '{print "\"" $0 "\\n\"";}'
-echo "static const char * const bbconfig_config ="
-# dash and probably ash produce wrong output (because of \n)
-# TODO: check whether our ash is ok
-echo "`sed 's/\"/\\\\\"/g' $config | grep "^#\? \?CONFIG_" | awk '{print "\\"" $0 "\\\\n\\"";}'`"
echo ";"
echo "#endif /* _BBCONFIGOPTS_H */"