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-16 23:02:43 +0100 |
commit | 49bb6cefb507c116cb2548ae842eb0653053fee4 (patch) | |
tree | 08df9f1ba369fffb08d5c9b58a13a9b4e182295a | |
parent | b598c0848975a328695f591e7b1ad09ab5842895 (diff) | |
download | poky-49bb6cefb507c116cb2548ae842eb0653053fee4.tar.gz |
oe-git-proxy: allow setting SOCAT from outside
This allows to write selftests where we can mock the real socat.
(From OE-Core rev: ea2690e867ff11250d3dd143184432dd03909910)
Signed-off-by: Henning Schild <henning.schild@siemens.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-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 bb2ed2a46e..8499a99a71 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 | |||
41 | fi | 41 | fi |
42 | 42 | ||
43 | # Locate the netcat binary | 43 | # Locate the netcat binary |
44 | SOCAT=$(which socat 2>/dev/null) | 44 | if [ -z "$SOCAT" ]; then |
45 | if [ $? -ne 0 ]; then | 45 | SOCAT=$(which socat 2>/dev/null) |
46 | echo "ERROR: socat binary not in PATH" 1>&2 | 46 | if [ $? -ne 0 ]; then |
47 | exit 1 | 47 | echo "ERROR: socat binary not in PATH" 1>&2 |
48 | exit 1 | ||
49 | fi | ||
48 | fi | 50 | fi |
49 | METHOD="" | 51 | METHOD="" |
50 | 52 | ||