diff options
author | Henning Schild <henning.schild@siemens.com> | 2019-09-03 15:43:45 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-09-15 17:49:47 +0100 |
commit | ea2690e867ff11250d3dd143184432dd03909910 (patch) | |
tree | 2d89f68009c13e512271239fa6b04e672c2b2a44 /scripts | |
parent | 698efe108de724d9129ca938151ab7c7d3cb34cc (diff) | |
download | openembedded-core-contrib-ea2690e867ff11250d3dd143184432dd03909910.tar.gz |
oe-git-proxy: allow setting SOCAT from outside
This allows to write selftests where we can mock the real socat.
Signed-off-by: Henning Schild <henning.schild@siemens.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/oe-git-proxy | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/scripts/oe-git-proxy b/scripts/oe-git-proxy index bb2ed2a46e4..8499a99a71f 100755 --- a/scripts/oe-git-proxy +++ b/scripts/oe-git-proxy @@ -41,10 +41,12 @@ if [ $# -lt 2 -o "$1" = '--help' -o "$1" = '-h' ] ; then fi # Locate the netcat binary -SOCAT=$(which socat 2>/dev/null) -if [ $? -ne 0 ]; then - echo "ERROR: socat binary not in PATH" 1>&2 - exit 1 +if [ -z "$SOCAT" ]; then + SOCAT=$(which socat 2>/dev/null) + if [ $? -ne 0 ]; then + echo "ERROR: socat binary not in PATH" 1>&2 + exit 1 + fi fi METHOD="" |