Skip to content

Commit

Permalink
Update activate (#392)
Browse files Browse the repository at this point in the history
* Update activate

Moved "export KCTF_CTF_DIR" into macOS check to use grealpath instead of realpath which doesn't seem supported.

* Update activate

Moved "export KCTF_CTF_DIR" into macOS check to use grealpath instead of realpath which doesn't seem supported.

* updating activate to include both grealpath and realpath

* updating fix per @sroettger's suggestion
  • Loading branch information
trvon authored Apr 27, 2023
1 parent ce38575 commit 7ba35c4
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion dist/activate
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ if [[ "$OSTYPE" =~ ^darwin.* ]]; then

STAT="gstat"
MKTEMP="gmktemp"

script_dir="$(dirname "${BASH_SOURCE-$0}")"
if [[ "$script_dir" == "." ]]; then
script_dir="../."
fi
export KCTF_CTF_DIR="$(realpath "$(dirname "${script_dir}")")"
unset script_dir
else
KCTF_YQ_URL="https://github.com/mikefarah/yq/releases/download/v4.2.0/yq_linux_amd64"
KCTF_YQ_HASH="5d44bd64e264e9029c5f06bcd960ba162d7ed7ddd1781f02a28d62f50577b632"
Expand All @@ -36,9 +43,9 @@ else

STAT="stat"
MKTEMP="mktemp"
export KCTF_CTF_DIR="$(realpath --no-symlinks "$(dirname "${BASH_SOURCE-$0}")/..")"
fi

export KCTF_CTF_DIR="$(realpath --no-symlinks "$(dirname "${BASH_SOURCE-$0}")/..")"
export KCTF_BIN="${KCTF_CTF_DIR}/kctf/bin"
source "${KCTF_BIN}/kctf-log"

Expand Down

0 comments on commit 7ba35c4

Please sign in to comment.