Skip to content

Commit cba7c8e

Browse files
committed
Support zsh as shell
Signed-off-by: Faholan <[email protected]>
1 parent 5443cc6 commit cba7c8e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

dev_env.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Set developer paths and environment variables here,
44
# user settings go in ./env.sh
55
function __setpaths() {
6-
local DIR=$(readlink -f "$(dirname "${BASH_SOURCE[0]}")")
6+
local DIR=$(readlink -f "$(dirname "${BASH_SOURCE[0]:-${(%):-%x}}")")
77
[ "$(find $DIR/dependencies -type f -user root)" ] && echo "WARNING! Files set up by sudo found in $DIR"
88
export PATH="$DIR/dependencies/bin:$PATH"
99
export CMAKE_INSTALL_RPATH=$DIR/dependencies/lib:$DIR/dependencies/lib64

env.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#!/usr/bin/env bash
22
function __setpaths() {
33
if [[ "$OSTYPE" == "darwin"* ]]; then
4-
DIR="$(dirname $(perl -e 'use Cwd "abs_path";print abs_path(shift)' "${BASH_SOURCE[0]}"))"
4+
DIR="$(dirname $(perl -e 'use Cwd "abs_path";print abs_path(shift)' "${BASH_SOURCE[0]:-${(%):-%x}}"))"
55
else
6-
DIR="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))"
6+
DIR="$(dirname $(readlink -f "${BASH_SOURCE[0]:-${(%):-%x}}"))"
77
fi
88

99
export OPENROAD=${DIR}/tools/OpenROAD

0 commit comments

Comments
 (0)