[oe-commits] [openembedded-core] 08/58: oe-git-proxy: allow setting SOCAT from outside

git at git.openembedded.org git at git.openembedded.org
Sun Sep 15 16:59:02 UTC 2019


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit ea2690e867ff11250d3dd143184432dd03909910
Author: Henning Schild <henning.schild at siemens.com>
AuthorDate: Tue Sep 3 15:43:45 2019 +0200

    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 at siemens.com>
    Signed-off-by: Ross Burton <ross.burton at intel.com>
---
 scripts/oe-git-proxy | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/scripts/oe-git-proxy b/scripts/oe-git-proxy
index bb2ed2a..8499a99 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=""
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list