[OE-core] [PATCH 6/6] oe-git-proxy: fix dash "Bad substitution"
Henning Schild
henning.schild at siemens.com
Tue Sep 3 12:22:24 UTC 2019
From: Henning Schild <henning.schild at siemens.com>
The script claims it works with dash, make sure that is actually the
case.
Signed-off-by: Henning Schild <henning.schild at siemens.com>
---
scripts/oe-git-proxy | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/scripts/oe-git-proxy b/scripts/oe-git-proxy
index 8f7b26c15e..2792020467 100755
--- a/scripts/oe-git-proxy
+++ b/scripts/oe-git-proxy
@@ -61,7 +61,7 @@ ipv4_val() {
IP="$1"
SHIFT=24
VAL=0
- for B in ${IP//./ }; do
+ for B in $( echo "$IP" | tr '.' ' ' ); do
VAL=$(($VAL+$(($B<<$SHIFT))))
SHIFT=$(($SHIFT-8))
done
@@ -136,8 +136,9 @@ fi
# disable pathname expansion, NO_PROXY fielnd could start with "*" or be it
set -f
+
# Connect directly to hosts in NO_PROXY
-for H in ${NO_PROXY//,/ }; do
+for H in $( echo "$NO_PROXY" | tr ',' ' ' ); do
if match_host $1 $H; then
exec $SOCAT STDIO $METHOD
fi
--
2.21.0
More information about the Openembedded-core
mailing list