From patchwork Wed Sep 23 00:51:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Zhou X-Patchwork-Id: 521521 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from archives.nicira.com (unknown [IPv6:2600:3c00::f03c:91ff:fe6e:bdf7]) by ozlabs.org (Postfix) with ESMTP id B97A71401AF for ; Wed, 23 Sep 2015 10:51:34 +1000 (AEST) Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id 66969109E9; Tue, 22 Sep 2015 17:51:32 -0700 (PDT) X-Original-To: dev@openvswitch.org Delivered-To: dev@openvswitch.org Received: from mx3v1.cudamail.com (mx3.cudamail.com [64.34.241.5]) by archives.nicira.com (Postfix) with ESMTPS id 57A8C109E7 for ; Tue, 22 Sep 2015 17:51:31 -0700 (PDT) Received: from bar3.cudamail.com (bar1 [192.168.15.1]) by mx3v1.cudamail.com (Postfix) with ESMTP id D98DA618C0A for ; Tue, 22 Sep 2015 18:51:30 -0600 (MDT) X-ASG-Debug-ID: 1442969490-03dd7b044808e40001-byXFYA Received: from mx3-pf1.cudamail.com ([192.168.14.2]) by bar3.cudamail.com with ESMTP id mNSnmBkmCOV2dBLb (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 22 Sep 2015 18:51:30 -0600 (MDT) X-Barracuda-Envelope-From: azhou@nicira.com X-Barracuda-RBL-Trusted-Forwarder: 192.168.14.2 Received: from unknown (HELO mail-pa0-f46.google.com) (209.85.220.46) by mx3-pf1.cudamail.com with ESMTPS (RC4-SHA encrypted); 23 Sep 2015 00:51:30 -0000 Received-SPF: unknown (mx3-pf1.cudamail.com: Multiple SPF records returned) X-Barracuda-Apparent-Source-IP: 209.85.220.46 X-Barracuda-RBL-IP: 209.85.220.46 Received: by pacfv12 with SMTP id fv12so24364691pac.2 for ; Tue, 22 Sep 2015 17:51:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=LAX0bWW84s3oEpmACufrsDSeMF5OztDHflQiR533dFE=; b=bln7qS8gNgEGVG0FJm5/dw0QdN2CRmlL62fN/TvdCTAF/olpLzOC5mDlYUOO44GSsC W/YISE01W1MXQ2nWzDLgNjV/WZ9/6CM2vEiDLB3+gGylsvXsNZX6vR1TcvHibTGyQVvY NUX8+guCxbqzH80BsLRAgacriqU/m/OvgascN2lg+3WXwbIZHgTrDQEf7D7FJox6S7yK d+iYDPl5Zvcx0tmskhgPH387nPAFbAsEJui+r0G0Mh1lYvE+S7CctbZXDs2HiWUTM2VF yS1xd2nU8eq7D6kisACCAwY8UJ0efeIrXJbh0ncEIyZSWoZIYI+OfD56hcPQhnQ6Ld7b wZAA== X-Gm-Message-State: ALoCoQkliQYVUc3LRbCiM+5+pGCxspX659/2Qc7Gl/3D6IkAk8e7puPZVeGmkh8TsFciwmQYCg25 X-Received: by 10.68.203.66 with SMTP id ko2mr33733749pbc.81.1442969489565; Tue, 22 Sep 2015 17:51:29 -0700 (PDT) Received: from ubuntu.localdomain ([208.91.1.34]) by smtp.gmail.com with ESMTPSA id qn5sm4441160pbc.74.2015.09.22.17.51.28 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 22 Sep 2015 17:51:29 -0700 (PDT) X-CudaMail-Envelope-Sender: azhou@nicira.com From: Andy Zhou To: dev@openvswitch.org X-CudaMail-Whitelist-To: dev@openvswitch.org X-CudaMail-MID: CM-V1-921062864 X-CudaMail-DTE: 092215 X-CudaMail-Originating-IP: 209.85.220.46 Date: Tue, 22 Sep 2015 17:51:13 -0700 X-ASG-Orig-Subj: [##CM-V1-921062864##][PATCH 4/8] ovs-dev.py: allow current directory to be used as the working directory Message-Id: <1442969477-11026-4-git-send-email-azhou@nicira.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1442969477-11026-1-git-send-email-azhou@nicira.com> References: <1442969477-11026-1-git-send-email-azhou@nicira.com> X-Barracuda-Connect: UNKNOWN[192.168.14.2] X-Barracuda-Start-Time: 1442969490 X-Barracuda-Encrypted: DHE-RSA-AES256-SHA X-Barracuda-URL: https://web.cudamail.com:443/cgi-mod/mark.cgi X-ASG-Whitelist: Header =?UTF-8?B?eFwtY3VkYW1haWxcLXdoaXRlbGlzdFwtdG8=?= X-Virus-Scanned: by bsmtpd at cudamail.com X-Barracuda-BRTS-Status: 1 Subject: [ovs-dev] [PATCH 4/8] ovs-dev.py: allow current directory to be used as the working directory X-BeenThere: dev@openvswitch.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dev-bounces@openvswitch.org Sender: "dev" 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 8128b08..54989e6 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"