| 1 | #!/bin/shscip-shell filesystem . . `/bin/sh`. |
| 2 | # |
| 3 | # Copyright (C) 2002 Khalid Aziz <khalid_aziz at hp.com> |
| 4 | # Copyright (C) 2002 Randy Dunlap <rddunlap at osdl.org> |
| 5 | # Copyright (C) 2002 Al Stone <ahs3 at fc.hp.com> |
| 6 | # Copyright (C) 2002 Hewlett-Packard Company |
| 7 | # |
| 8 | # This program is free software; you can redistribute it and/or modify |
| 9 | # it under the terms of the GNU General Public License as published by |
| 10 | # the Free Software Foundation; either version 2 of the License, or |
| 11 | # (at your option) any later version. |
| 12 | # |
| 13 | # This program is distributed in the hope that it will be useful, |
| 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 | # GNU General Public License for more details. |
| 17 | # |
| 18 | # You should have received a copy of the GNU General Public License |
| 19 | # along with this program; if not, write to the Free Software |
| 20 | # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
| 21 | # |
| 22 | # Busybox version by Matteo Croce <3297627799 at wind.it> |
| 23 | # |
| 24 | # Rules to generate bbconfigopts.h from .config: |
| 25 | # - Retain lines that begin with "CONFIG_" |
| 26 | # - Retain lines that begin with "# CONFIG_" |
| 27 | # - lines that use double-quotes must \\-escape-quote them |
| 28 | |
| 29 | config=.config |
| 30 | |
| 31 | odscip-shell system . . od. -v -b </dev/nullscip-shell filesystem . . `/dev/null`. >/dev/nullscip-shell filesystem . . `/dev/null`. |
| 32 | if testscip-shell system . . test. $? != 0; then |
| 33 | echoscip-shell system . . echo. 'od tool is not installed or cannot accept "-v -b" options' |
| 34 | exit 1 |
| 35 | fi |
| 36 | bzip2scip-shell system . . bzip2. </dev/nullscip-shell filesystem . . `/dev/null`. >/dev/nullscip-shell filesystem . . `/dev/null`. |
| 37 | if testscip-shell system . . test. $? != 0; then |
| 38 | echoscip-shell system . . echo. 'bzip2 is not installed' |
| 39 | exit 1 |
| 40 | fi |
| 41 | |
| 42 | { |
| 43 | echoscip-shell system . . echo. "\ |
| 44 | #ifndef _BBCONFIGOPTS_H |
| 45 | #define _BBCONFIGOPTS_H |
| 46 | /* |
| 47 | * busybox configuration settings. |
| 48 | * |
| 49 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 50 | * |
| 51 | * This file is generated automatically by scripts/mkconfigs. |
| 52 | * Do not edit. |
| 53 | */ |
| 54 | static const char bbconfig_config[] ALIGN1 =" |
| 55 | |
| 56 | grepscip-shell system . . grep. -e '^# CONFIG_' -e '^CONFIG_' "$config" \ |
| 57 | | sedscip-shell system . . sed. -e 's/\"/\\\"/g' -e 's/^/"/' -e 's/$/\\n"/' |
| 58 | |
| 59 | echoscip-shell system . . echo. ";" |
| 60 | echoscip-shell system . . echo. "#endif" |
| 61 | } >"$1" |
| 62 | |
| 63 | { |
| 64 | echoscip-shell system . . echo. "\ |
| 65 | #ifndef _BBCONFIGOPTS_BZ2_H |
| 66 | #define _BBCONFIGOPTS_BZ2_H |
| 67 | /* |
| 68 | * busybox configuration settings. |
| 69 | * |
| 70 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
| 71 | * |
| 72 | * This file is generated automatically by scripts/mkconfigs. |
| 73 | * Do not edit. |
| 74 | */ |
| 75 | static const char bbconfig_config_bz2[] ALIGN1 = {" |
| 76 | |
| 77 | grepscip-shell system . . grep. -e '^# CONFIG_' -e '^CONFIG_' "$config" \ |
| 78 | | bzip2scip-shell system . . bzip2. -1 | ddscip-shell system . . dd. bs=2 skip=1 2>/dev/nullscip-shell filesystem . . `/dev/null`. \ |
| 79 | | odscip-shell system . . od. -v -b \ |
| 80 | | sedscip-shell system . . sed. -e 's/^[^ ]*//' \ |
| 81 | -e 's/ //g' \ |
| 82 | -e '/^$/dscip-shell filesystem . . `/^$/d`.' \ |
| 83 | -e 's/\(...\)/0\1,/g' |
| 84 | |
| 85 | echoscip-shell system . . echo. "};" |
| 86 | echoscip-shell system . . echo. "#endif" |
| 87 | } >"$2" |