diff options
Diffstat (limited to 'build')
-rwxr-xr-x | build | 21 |
1 files changed, 14 insertions, 7 deletions
@@ -11,13 +11,20 @@ config_enabled = \ 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; \ + case "$${cfg}" in \ + !*) \ + cfg="$$(printf '%s' "$${cfg}" | \ + sed 's/^!//')"; \ + grep -q "^CONFIG_$${cfg}=y$$" \ + <src/.config \ + && enabled=false; \ + ;; \ + *) \ + grep -q "^CONFIG_$${cfg}=y$$" \ + <src/.config \ + && enabled=true; \ + ;; \ + esac; \ done; \ unset IFS; \ $${enabled}; \ |