Refactor busybox config setting to match buildroot's new form

This commit is contained in:
Tianon Gravi 2015-10-14 10:57:23 -07:00
parent 0674f8d162
commit 4b33520da6
1 changed files with 11 additions and 3 deletions

View File

@ -86,20 +86,28 @@ RUN set -x \
&& tar -xf busybox.tar.bz2 --strip-components 1 \
&& rm busybox.tar.bz2*
RUN confs=' \
RUN yConfs=' \
CONFIG_AR \
CONFIG_FEATURE_AR_LONG_FILENAMES \
CONFIG_FEATURE_AR_CREATE \
CONFIG_STATIC \
' \
&& nConfs=' \
' \
&& set -xe \
&& make defconfig \
&& for conf in $confs; do \
&& for conf in $nConfs; do \
sed -i "s!^$conf=y!# $conf is not set!" .config; \
done \
&& for conf in $yConfs; do \
sed -i "s!^# $conf is not set\$!$conf=y!" .config; \
grep -q "^$conf=y" .config || echo "$conf=y" >> .config; \
done \
&& make oldconfig \
&& for conf in $confs; do \
&& for conf in $nConfs; do \
! grep -q "^$conf=y" .config; \
done \
&& for conf in $yConfs; do \
grep -q "^$conf=y" .config; \
done