-
Notifications
You must be signed in to change notification settings - Fork 2
/
gitpod_init.sh
executable file
·30 lines (20 loc) · 966 Bytes
/
gitpod_init.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash
METALS_DIR="$GITPOD_REPO_ROOT/.metals"
APPS_DIR="$METALS_DIR/apps"
METALS_VERSION="0.9.8"
mkdir -p $APPS_DIR
export PATH=$PATH:/usr/local/openjdk-8/bin:$APPS_DIR
echo "-Dsbt.coursier.home=$METALS_DIR/coursier" >> .jvmopts
echo "-Dcoursier.cache=$METALS_DIR/coursier" >> .jvmopts
echo "-Dsbt-dir=$METALS_DIR/sbt" >> .jvmopts
echo "-Dsbt-boot=$METALS_DIR/sbt/boot" >> .jvmopts
echo "-Divy=$METALS_DIR/.ivy2" >> .jvmopts
curl -Lo $APPS_DIR/cs https://git.io/coursier-cli-linux && chmod +x $APPS_DIR/cs
cs install --install-dir $APPS_DIR --only-prebuilt=true bloop
cs install --install-dir $APPS_DIR sbt
source ./template_setup.sh
cs fetch org.scalameta:metals_2.12:$METALS_VERSION --cache=$METALS_DIR/coursier
cs fetch org.scalameta:scalafmt-cli_2.12:2.7.5 --cache=$METALS_DIR/coursier
sbt -Dbloop.export-jar-classifiers=sources bloopInstall
bloop compile --cascade root
echo "export PATH=\$PATH:/usr/local/openjdk-8/bin:$APPS_DIR" >> ~/.bashrc