diff options
author | Patrick 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) |
commit | d69d29880bdbe0764870d146a91873f697305a54 (patch) | |
tree | 0e61ac717d44a6ab98926f257166229267426d93 /build | |
parent | e57503a84591f94c970c5c76a22808cc22152194 (diff) |
build: Support and-lists of script configs
Diffstat (limited to 'build')
-rwxr-xr-x | build | 16 |
1 files changed, 15 insertions, 1 deletions
@@ -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() \ |