From patchwork Thu Oct 20 15:46:25 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leif Lindholm X-Patchwork-Id: 78536 Delivered-To: patch@linaro.org Received: by 10.140.97.247 with SMTP id m110csp850922qge; Thu, 20 Oct 2016 08:46:35 -0700 (PDT) X-Received: by 10.99.113.84 with SMTP id b20mr1947808pgn.79.1476978395076; Thu, 20 Oct 2016 08:46:35 -0700 (PDT) Return-Path: Received: from ml01.01.org (ml01.01.org. [198.145.21.10]) by mx.google.com with ESMTPS id qf10si38105038pac.106.2016.10.20.08.46.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Oct 2016 08:46:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) client-ip=198.145.21.10; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 4EFFB1A1E8D; Thu, 20 Oct 2016 08:46:33 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received: from mail-qt0-x22d.google.com (mail-qt0-x22d.google.com [IPv6:2607:f8b0:400d:c0d::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id C88271A1E86 for ; Thu, 20 Oct 2016 08:46:31 -0700 (PDT) Received: by mail-qt0-x22d.google.com with SMTP id m5so59268891qtb.3 for ; Thu, 20 Oct 2016 08:46:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=R1hBqc92k2fqs1pbbRpbTqTkz7gKrtHjTXYSETGBrvY=; b=akDHYCQd8rW8eutmDYN0t0a/QrsGdRcbVJv5wdC8NhucMdgSroUaw08Bx/Gp6fQQt7 6XKsCPcNwHeEb6soFKKal1mWTMw/peMfAu+q1AwUKu9hJz6ZHd3fPlch1agYLwttWI/I 2yU/LuwtemjDgwwZevLgakhClOx3CkQJEVFSs= 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=R1hBqc92k2fqs1pbbRpbTqTkz7gKrtHjTXYSETGBrvY=; b=epIw/PzW2WgF+5ZwiV8sowuJwhgSxqzwsiBHbQ0Ow9L8tpztFwRZ89YCkXi9xzocsG LvSG6U2bJxJ5X5tvhOhjEoVCDT5DYIaLIM2qbmOOJv/nppbEkE3PeH2S0BXfbmGOzbFp 8H1JghGYMBhxQMh3bs4cthUo1PeU8zY09tioxTp0VFWhLXnd/VjfFhcYCLEJkVJqjY2+ x5Lt2RRLO8hbPEYciH4xd80u3yTp6XjDsc228sDSozOyQflxwNSP8VVdWD5pURcXdQx3 cJJ0smMsTVo8zdblLlqyPRZbFDXcITlsiN24uEnxg5t9XaF/7kj76FEufYBJxUW6xJti NJRQ== X-Gm-Message-State: AA6/9RmWKB0yvV6SuygPtlicEShuFAGNAU2+xNAdlLcWo35jDoNH7EbSkt+V7Dzn3sAIQwln X-Received: by 10.194.141.233 with SMTP id rr9mr771587wjb.18.1476978390064; Thu, 20 Oct 2016 08:46:30 -0700 (PDT) Received: from mohikan.eciton.net ([2a01:348:6:8735:e23f:49ff:fe6d:9d26]) by smtp.gmail.com with ESMTPSA id ce6sm79640115wjc.27.2016.10.20.08.46.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Oct 2016 08:46:29 -0700 (PDT) From: Leif Lindholm To: edk2-devel@lists.01.org Date: Thu, 20 Oct 2016 16:46:25 +0100 Message-Id: <20161020154625.31352-3-leif.lindholm@linaro.org> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20161020154625.31352-1-leif.lindholm@linaro.org> References: <20161020154625.31352-1-leif.lindholm@linaro.org> Subject: [edk2] [PATCH 2/2] edksetup.sh, BaseTools/BuildEnv: add --reconfig support X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Liming Gao MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" Add command line option --reconfig to edksetup.sh, forcing cached copies of Conf/*.txt to be overwritten. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Leif Lindholm --- BaseTools/BuildEnv | 3 ++- edksetup.sh | 10 ++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) -- 2.9.3 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel diff --git a/BaseTools/BuildEnv b/BaseTools/BuildEnv index 7c77454..cb6403a 100755 --- a/BaseTools/BuildEnv +++ b/BaseTools/BuildEnv @@ -3,6 +3,7 @@ # This file must be "sourced" not merely executed. For example: ". edksetup.sh" # # Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.
+# Copyright (c) 2016, Linaro Ltd. All rights reserved.
# This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at @@ -215,7 +216,7 @@ CopySingleTemplateFile() { if [ -e $DST_FILENAME ] then - return + [ $RECONFIG != TRUE ] && return fi echo "Copying \$EDK_TOOLS_PATH/$SRC_FILENAME" diff --git a/edksetup.sh b/edksetup.sh index 7b54223..ec54f9e 100755 --- a/edksetup.sh +++ b/edksetup.sh @@ -24,6 +24,7 @@ # SCRIPTNAME="edksetup.sh" +RECONFIG=FALSE function HelpMsg() { @@ -35,6 +36,9 @@ function HelpMsg() echo "Options: " echo " --help, -h, -? Print this help screen and exit." echo + echo " --reconfig Overwrite the WORKSPACE/Conf/*.txt files with the" + echo " template files from the BaseTools/Conf directory." + echo echo Please note: This script must be \'sourced\' so the environment can be changed. echo ". $SCRIPTNAME" echo "source $SCRIPTNAME" @@ -121,6 +125,10 @@ do # Ignore argument for backwards compatibility shift ;; + --reconfig) + RECONFIG=TRUE + shift + ;; -?|-h|--help|*) HelpMsg break @@ -136,4 +144,6 @@ fi SourceEnv +unset SCRIPTNAME RECONFIG + return $?