Skip to content

Commit

Permalink
[misc] Make env.sh source'able not only in ZSH but also in Bash
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitry-kabanov committed Jan 24, 2025
1 parent 45a2e40 commit 55522c1
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions env.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
# Set project root directory to use absolute paths below.
export PRJ_ROOT_DIR=""
if [ "$GITHUB_ACTIONS" = "true" ]; then
export PRJ_ROOT_DIR="$GITHUB_WORKSPACE"
PRJ_ROOT_DIR="$GITHUB_WORKSPACE"
else
export PRJ_ROOT_DIR="$(dirname $(realpath "$0"))"
if [ "$0" = "-bash" ]; then
PRJ_ROOT_DIR="$(dirname "$(realpath ${BASH_SOURCE[0]})")"
else
PRJ_ROOT_DIR="$(dirname "$(realpath "$0")")"
fi
fi

# Set path to implementations
Expand Down

0 comments on commit 55522c1

Please sign in to comment.