Skip to content

Commit

Permalink
Use common copy of Scala, if it's available
Browse files Browse the repository at this point in the history
  • Loading branch information
propensive committed Mar 7, 2023
1 parent 681c394 commit d8af022
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions wrath
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ declare -i columns

group[dotty]="lampepfl"
esc=$'\e'
compiler="$(realpath scala)"
columns=${COLUMNS:-116}
configFile="${XDG_CONFIG_HOME:-$HOME/.config}/wrath.conf"

Expand Down Expand Up @@ -80,15 +79,18 @@ clean() {
}

checkCompiler() {
if [ ! -d "scala" ]
if [ ! -d scala ]
then
if [ "$fetch" = "2" ]
if [ -d "$defaultDir"/scala ]
then compiler="$(realpath "$defaultDir"/scala)"
elif [ "$fetch" = "2" ]
then
compiler="$(realpath scala)"
gmessage "Fetching Scala compiler"
fetch dotty && mv dotty scala
gmessage "Building Scala compiler"
mkdir -p .wrath/log
scala/bin/scalac -version > .wrath/log/scala.log 2>&1
$compiler/bin/scalac -version > .wrath/log/scala.log 2>&1
gmessage "Finished building Scala compiler"
gmessage "$(scala/bin/scala -version 2>&1)"
else
Expand Down

0 comments on commit d8af022

Please sign in to comment.