summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2020-12-12 23:37:05 (EST)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2020-12-13 01:36:20 (EST)
commitd69d29880bdbe0764870d146a91873f697305a54 (patch)
tree0e61ac717d44a6ab98926f257166229267426d93 /build
parente57503a84591f94c970c5c76a22808cc22152194 (diff)
build: Support and-lists of script configs
Diffstat (limited to 'build')
-rwxr-xr-xbuild16
1 files changed, 15 insertions, 1 deletions
diff --git a/build b/build
index e1b11ad..7e95002 100755
--- a/build
+++ b/build
@@ -6,7 +6,21 @@ config_enabled = \
config_enabled() \
{ \
[ "x$${1}" = 'x-' ] && return 0; \
- grep "^CONFIG_$${1}=y$$" <src/.config >/dev/null 2>&1; \
+ enabled=false; \
+ IFS='& '; \
+ for cfg in $$(printf '%s' "$${1}"); do \
+ unset IFS; \
+ [ x"$${cfg}" = x'' ] && continue; \
+ if [ x"$${cfg#!}" = x"$${cfg}" ]; then \
+ grep -q "^CONFIG_$${cfg}=y$$" <src/.config \
+ && enabled=true; \
+ else \
+ grep -q "^CONFIG_$${cfg#!}=y$$" <src/.config \
+ && enabled=false; \
+ fi; \
+ done; \
+ unset IFS; \
+ $${enabled}; \
}
install_init_script = \
install_init_script() \