From 9bf2f075d76accfe314adaa7182bf9c978a6a9c3 Mon Sep 17 00:00:00 2001 From: Andy Zhou Date: Fri, 11 Sep 2015 13:34:24 -0700 Subject: [PATCH] ovs-dev.py: allow current directory to be used as the working directory Rather than forcing a single ovs source tree under ~/ovs, this change supports invoking the script from the root of any ovs source tree as the working source tree. If the script is invoked from a directory not recognized as OVS source tree, ~/ovs will then be used. Signed-off-by: Andy Zhou Acked-by: Joe Stringer --- utilities/ovs-dev.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/utilities/ovs-dev.py b/utilities/ovs-dev.py index 8128b08f9..54989e6f5 100755 --- a/utilities/ovs-dev.py +++ b/utilities/ovs-dev.py @@ -22,7 +22,10 @@ import tempfile ENV = os.environ HOME = ENV["HOME"] +PWD = os.getcwd() OVS_SRC = HOME + "/ovs" +if os.path.exists(PWD + "/WHY-OVS.md"): + OVS_SRC = PWD # Use current directory as OVS source tree ROOT = HOME + "/root" BUILD_GCC = OVS_SRC + "/_build-gcc" BUILD_CLANG = OVS_SRC + "/_build-clang" -- 2.20.1