summaryrefslogtreecommitdiffstats
path: root/scripts/oe-git-proxy
diff options
context:
space:
mode:
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>2015-09-18 12:46:05 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-09-21 15:20:09 +0100
commit39eb19e2ae9add58c763b71b54bdb3739041b2d0 (patch)
tree3bda07196cde82c0d54eea77e6d0a6c01d14c09f /scripts/oe-git-proxy
parentc01e61d8b79d644880415986bdb1ba925f194329 (diff)
downloadopenembedded-core-39eb19e2ae9add58c763b71b54bdb3739041b2d0.tar.gz
oe-git-proxy: Correct the parsing of a port in $ALL_PROXY
Due to an error in the regular expression used to extract a port number specified in $ALL_PROXY, rather than allowing the port number to be followed by an optional "/", the port was required to be followed by "/?". This corrects the regular expression to allow an optional "/". It also allows the odd "/?" suffix for backwards compatibility. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'scripts/oe-git-proxy')
-rwxr-xr-xscripts/oe-git-proxy4
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/oe-git-proxy b/scripts/oe-git-proxy
index 24732829fb..b971c88ec5 100755
--- a/scripts/oe-git-proxy
+++ b/scripts/oe-git-proxy
@@ -113,7 +113,9 @@ done
# Proxy is necessary, determine protocol, server, and port
PROTO=$(echo $ALL_PROXY | sed -e 's/\([^:]*\):\/\/.*/\1/')
PROXY=$(echo $ALL_PROXY | sed -e 's/.*:\/\/\([^:]*\).*/\1/')
-PORT=$(echo $ALL_PROXY | sed -e 's/.*:\([0-9]*\)\/?$/\1/')
+# For backwards compatibility, this allows the port number to be followed by /?
+# in addition to the customary optional /
+PORT=$(echo $ALL_PROXY | sed -e 's/.*:\([0-9]*\)\(\/?\?\)\?$/\1/')
if [ "$PORT" = "$ALL_PROXY" ]; then
PORT=""
fi