From 5b9023da96fb288ce3d7e71e66afac48ed67c2d3 Mon Sep 17 00:00:00 2001
From: dam1n19 <dam1n19@soton.ac.uk>
Date: Mon, 3 Apr 2023 14:08:14 +0100
Subject: [PATCH] SOC1-124: Updated flow to work with bash

---
 set_env.sh | 2 +-
 sourceme   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/set_env.sh b/set_env.sh
index b085f8b..1ee25dd 100644
--- a/set_env.sh
+++ b/set_env.sh
@@ -24,7 +24,7 @@ if [ -z $DESIGN_ROOT ]; then
     source $DESIGN_ROOT/set_env.sh
 else
     # Set Environment Variable for this Repository
-    export ACC_WRAPPER_DIR="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
+    export ACC_WRAPPER_DIR="$(cd -P "$(dirname "${BASH_SOURCE[0]:-${(%):-%x}}")" && pwd)"
 
     # If this Repo is root of workspace
     if [ $ACC_WRAPPER_DIR = $DESIGN_ROOT ]; then
diff --git a/sourceme b/sourceme
index 12e0c2a..cbd7285 100755
--- a/sourceme
+++ b/sourceme
@@ -13,7 +13,7 @@
 
 if [ -z "$ACC_WRAPPER_DIR" ]; then
     # Set environment Variables for Repository
-    export ACC_WRAPPER_DIR="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
+    export ACC_WRAPPER_DIR="$(cd -P "$(dirname "${BASH_SOURCE[0]:-${(%):-%x}}")" && pwd)"
 
     if [ -z "$SOC_ENV_SET" ]; then
         # Add flow directory to Path
-- 
GitLab