public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: vijaikumar.kanagarajan@gmail.com
To: isar-users@googlegroups.com, henning.schild@siemens.com,
	claudius.heine.ext@siemens.com
Cc: jan.kiszka@siemens.com,
	Vijai Kumar K <Vijaikumar_Kanagarajan@mentor.com>
Subject: [PATCH v2] isar-init-build-env: Always set ISARROOT
Date: Sat, 28 Sep 2019 03:13:52 +0530	[thread overview]
Message-ID: <20190927214352.32114-1-Vijaikumar_Kangarajan@mentor.com> (raw)
In-Reply-To: <20190927213804.31651-1-Vijaikumar_Kangarajan@mentor.com>

From: Vijai Kumar K <Vijaikumar_Kanagarajan@mentor.com>

When switching between two ISAR workspaces in the same shell
session, the ISARROOT setting of the previous workspace would be
picked up for the new workspace resulting in an incorrect
configuration.

Always set ISARROOT irrespective of whether it is empty or not.

Signed-off-by: Vijai Kumar K <Vijaikumar_Kanagarajan@mentor.com>
---
Changes in v2:
    - Remove redundant code

 isar-init-build-env | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/isar-init-build-env b/isar-init-build-env
index b08bb59..404efcb 100755
--- a/isar-init-build-env
+++ b/isar-init-build-env
@@ -42,13 +42,10 @@ if [ -z "$ZSH_NAME" ] && [ "$0" = "$THIS_SCRIPT" ]; then
     exit 1
 fi
 
-if [ -z "$ISARROOT" ]; then
-    ISARROOT=$(dirname "$THIS_SCRIPT")
-    ISARROOT=$(readlink -f "$ISARROOT")
-fi
+ISARROOT=$(dirname "$THIS_SCRIPT")
+ISARROOT=$(readlink -f "$ISARROOT")
 unset THIS_SCRIPT
 
-ISARROOT=$(readlink -f "$ISARROOT")
 export ISARROOT
 . "$ISARROOT/scripts/isar-buildenv-internal" "$1" && \
     TEMPLATECONF="$TEMPLATECONF" "$ISARROOT/scripts/isar-setup-builddir" || {
-- 
2.17.1


  reply	other threads:[~2019-09-27 21:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-27 21:38 [PATCH] " vijaikumar.kanagarajan
2019-09-27 21:43 ` vijaikumar.kanagarajan [this message]
2019-09-30  6:06   ` [PATCH v2] " Jan Kiszka
2019-09-30  6:46     ` Vijai Kumar K
2019-09-30  7:01       ` Jan Kiszka
2019-09-30  7:49         ` Vijai Kumar K
2019-12-11 10:14         ` vijai kumar
2019-12-17 12:24           ` Baurzhan Ismagulov
2019-12-24  5:21             ` vijai kumar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190927214352.32114-1-Vijaikumar_Kangarajan@mentor.com \
    --to=vijaikumar.kanagarajan@gmail.com \
    --cc=Vijaikumar_Kanagarajan@mentor.com \
    --cc=claudius.heine.ext@siemens.com \
    --cc=henning.schild@siemens.com \
    --cc=isar-users@googlegroups.com \
    --cc=jan.kiszka@siemens.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox