summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2020-12-13 00:39:09 (EST)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2020-12-13 01:38:25 (EST)
commit9e7b3e06d8042e46e2b7026223c674bc1225bf39 (patch)
treefd098290320ef598b20227e8aa9537548af23538 /build
parent49eff1e1b186a185e069a04c9af0da6be7a26708 (diff)
build: Can't use "#" in target commands
Fixes: /bin/sh: syntax error: unterminated quoted string make: *** [../build:55: install] Error 2
Diffstat (limited to 'build')
-rwxr-xr-xbuild21
1 files changed, 14 insertions, 7 deletions
diff --git a/build b/build
index 7e95002..0818545 100755
--- a/build
+++ b/build
@@ -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}; \