summaryrefslogtreecommitdiff
path: root/sofort
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2019-10-20 00:17:44 +0000
committermidipix <writeonce@midipix.org>2019-10-20 00:22:03 +0000
commit9b58bb7b18438deb9b91df0ac771c4a762636a30 (patch)
tree5ce119c959b6de573665ec707a01a1e02468ba89 /sofort
parentc19e8abbdef121d62af63424861e8748a16866de (diff)
downloadbfirm-9b58bb7b18438deb9b91df0ac771c4a762636a30.tar.bz2
bfirm-9b58bb7b18438deb9b91df0ac771c4a762636a30.tar.xz
build system: ccenv.sh: support shells with private loop iteration variables.
Diffstat (limited to 'sofort')
-rw-r--r--sofort/ccenv/ccenv.sh15
1 files changed, 9 insertions, 6 deletions
diff --git a/sofort/ccenv/ccenv.sh b/sofort/ccenv/ccenv.sh
index d6f48f2..e28a1fb 100644
--- a/sofort/ccenv/ccenv.sh
+++ b/sofort/ccenv/ccenv.sh
@@ -51,14 +51,16 @@ ccenv_comment()
ccenv_find_tool()
{
if [ -z "$ccenv_prefixes" ]; then
- for ccenv_tool in $(printf %s "$ccenv_candidates"); do
+ for ccenv_candidate in $(printf %s "$ccenv_candidates"); do
if [ -z ${@:-} ]; then
- if command -v "$ccenv_tool" > /dev/null; then
+ if command -v "$ccenv_candidate" > /dev/null; then
+ ccenv_tool="$ccenv_candidate"
return 0
fi
else
- if command -v "$ccenv_tool" > /dev/null; then
- if "$ccenv_tool" $@ > /dev/null 2>&1; then
+ if command -v "$ccenv_candidate" > /dev/null; then
+ if "$ccenv_candidate" $@ > /dev/null 2>&1; then
+ ccenv_tool="$ccenv_candidate"
return 0
fi
fi
@@ -80,8 +82,9 @@ ccenv_find_tool()
done
done
- for ccenv_tool in $(printf %s "$ccenv_candidates"); do
- if command -v "$ccenv_tool" > /dev/null; then
+ for ccenv_candidate in $(printf %s "$ccenv_candidates"); do
+ if command -v "$ccenv_candidate" > /dev/null; then
+ ccenv_tool="$ccenv_candidate"
return 0
fi
done