File tree Expand file tree Collapse file tree 4 files changed +50
-18
lines changed Expand file tree Collapse file tree 4 files changed +50
-18
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -4,11 +4,14 @@ set -ex
4
4
5
5
SCRIPT_PATH=$( dirname " $0 " )
6
6
SCRIPT_PATH=$( cd " $SCRIPT_PATH " && pwd)
7
- TRUFFLERUBY_DIR=$SCRIPT_PATH /../..
7
+ TRUFFLERUBY_DIR=$SCRIPT_PATH /..
8
8
9
- sudo apt-get install -y cmake libssl-dev libz-dev python
9
+ if [ ! -z " $SPIN " ]; then
10
+ echo " source '$TRUFFLERUBY_DIR /.spin/env-custom'" > ~ /.zshrc.d/truffleruby
11
+ fi
10
12
11
- source " $TRUFFLERUBY_DIR " /.spin/bin/env
13
+ export SPIN_INITIALIZING=true
14
+ source " $TRUFFLERUBY_DIR " /.spin/env-custom
12
15
13
16
mkdir -p ~ /.rubies
14
17
Original file line number Diff line number Diff line change
1
+ # $BASH_SOURCE[0] is for Bash, ${(%):-%x} is for Zsh
2
+ SCRIPT_PATH=$(dirname "${BASH_SOURCE[0]:-${(%):-%x}}")
3
+ SCRIPT_PATH=$(cd "$SCRIPT_PATH" && pwd)
4
+ TRUFFLERUBY_DIR=$SCRIPT_PATH/..
5
+ export JT_ENV=jvm-ce
6
+ export JT_SPECS_COMPILATION=false
7
+
8
+ unset JAVA_HOME
9
+
10
+ # Use CRuby to run jt
11
+ export SYSTEM_RUBY=$(which ruby)
12
+
13
+ function jt {
14
+ if [ -z "$SPIN" -o ! -z "$SPIN_INITIALIZING" ]; then
15
+ "$TRUFFLERUBY_DIR"/bin/jt "$@"
16
+ else
17
+ service_status=$(systemctl show -p ActiveState --value spin-environment@shopify--truffleruby)
18
+ case "$service_status" in
19
+ active)
20
+ "$TRUFFLERUBY_DIR"/bin/jt "$@"
21
+ ;;
22
+
23
+ activating|inactive)
24
+ echo "\033[0;31mTruffleRuby is still building..."
25
+ return 1
26
+ ;;
27
+
28
+ failed)
29
+ echo "\033[0;31mTruffleRuby failed to build."
30
+ return 1
31
+ ;;
32
+
33
+ *)
34
+ echo "\033[0;31mUnknown TruffleRuby service status: $service_status"
35
+ return 1
36
+ ;;
37
+ esac
38
+ fi
39
+ }
Original file line number Diff line number Diff line change
1
+ ---
2
+ - cmake
3
+ - libssl-dev
4
+ - libz-dev
5
+ - python
You can’t perform that action at this time.
0 commit comments