diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-02-04 02:38:21 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-02-04 02:38:21 +0000 |
commit | 45854b5e3ff265c23dc36c139f09ea8eb3790ad1 (patch) | |
tree | 65e35f8e209d94063a1d2ddfe9b8df5053b18f56 | |
parent | 9f85de1821de853b6d4c413273a4467df50b96f6 (diff) | |
download | busybox-w32-45854b5e3ff265c23dc36c139f09ea8eb3790ad1.tar.gz busybox-w32-45854b5e3ff265c23dc36c139f09ea8eb3790ad1.tar.bz2 busybox-w32-45854b5e3ff265c23dc36c139f09ea8eb3790ad1.zip |
mkconfigs: remove echo "`...`" contortion
-rwxr-xr-x | scripts/mkconfigs | 21 |
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 @@ | |||
21 | # | 21 | # |
22 | # Busybox version by Matteo Croce <3297627799 at wind.it> | 22 | # Busybox version by Matteo Croce <3297627799 at wind.it> |
23 | # | 23 | # |
24 | # Rules to generate bbconfig.h from .config: | 24 | # Rules to generate bbconfigopts.h from .config: |
25 | # - Retain lines that begin with "CONFIG_" | 25 | # - Retain lines that begin with "CONFIG_" |
26 | # - Retain lines that begin with "# CONFIG_" | 26 | # - Retain lines that begin with "# CONFIG_" |
27 | # - lines that use double-quotes must \\-escape-quote them | 27 | # - lines that use double-quotes must \\-escape-quote them |
28 | 28 | ||
29 | config="$1" | ||
29 | if [ $# -lt 1 ] | 30 | if [ $# -lt 1 ] |
30 | then | 31 | then |
31 | config=.config | 32 | config=.config |
32 | else config=$1 | ||
33 | fi | 33 | fi |
34 | 34 | ||
35 | echo "#ifndef _BBCONFIGOPTS_H" | 35 | echo "\ |
36 | echo "#define _BBCONFIGOPTS_H" | 36 | #ifndef _BBCONFIGOPTS_H |
37 | echo \ | 37 | #define _BBCONFIGOPTS_H |
38 | "/* | 38 | /* |
39 | * busybox configuration settings. | 39 | * busybox configuration settings. |
40 | * | 40 | * |
41 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. | 41 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. |
@@ -43,11 +43,10 @@ echo \ | |||
43 | * This file is generated automatically by scripts/mkconfigs. | 43 | * This file is generated automatically by scripts/mkconfigs. |
44 | * Do not edit. | 44 | * Do not edit. |
45 | * | 45 | * |
46 | */" | 46 | */ |
47 | static const char * const bbconfig_config =" | ||
48 | |||
49 | sed 's/\"/\\\"/g' $config | grep "^#\? \?CONFIG_" | awk '{print "\"" $0 "\\n\"";}' | ||
47 | 50 | ||
48 | echo "static const char * const bbconfig_config =" | ||
49 | # dash and probably ash produce wrong output (because of \n) | ||
50 | # TODO: check whether our ash is ok | ||
51 | echo "`sed 's/\"/\\\\\"/g' $config | grep "^#\? \?CONFIG_" | awk '{print "\\"" $0 "\\\\n\\"";}'`" | ||
52 | echo ";" | 51 | echo ";" |
53 | echo "#endif /* _BBCONFIGOPTS_H */" | 52 | echo "#endif /* _BBCONFIGOPTS_H */" |