]> code.ossystems Code Review - openembedded-core.git/commitdiff
oe-git-proxy: fix dash "Bad substitution"
authorHenning Schild <henning.schild@siemens.com>
Tue, 3 Sep 2019 13:43:50 +0000 (15:43 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 15 Sep 2019 16:49:48 +0000 (17:49 +0100)
The script claims it works with dash, make sure that is actually the
case.

Signed-off-by: Henning Schild <henning.schild@siemens.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
scripts/oe-git-proxy

index 2cb995f43cfe1855bb8462cab5b3b5d47672e72b..aa9b9dc9a94f224aab7c22e666f1ac946d9e7408 100755 (executable)
@@ -64,7 +64,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
@@ -137,7 +137,7 @@ if [ -z "$ALL_PROXY" ]; then
 fi
 
 # 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