Skip to content

Commit 84d5d61

Browse files
committed
[GR-19220] Support sourcing the Spin environment file from a Bash script (#2373)
PullRequest: truffleruby/2713
2 parents 30faa4f + 94cb39b commit 84d5d61

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

.spin/bin/env

100755100644
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
#!/bin/bash
2-
3-
SCRIPT_PATH=$(dirname "$0")
1+
# $BASH_SOURCE[0] is for Bash, ${(%):-%x} is for Zsh
2+
SCRIPT_PATH=$(dirname "${BASH_SOURCE[0]:-${(%):-%x}}")
43
SCRIPT_PATH=$(cd "$SCRIPT_PATH" && pwd)
54
TRUFFLERUBY_DIR=$SCRIPT_PATH/../..
65
export JT_ENV=jvm-ce

0 commit comments

Comments
 (0)