#!/bin/sh
# Scala 3 compiler (Debian scala3). As upstream's bin/scalac, the class path
# that runs the compiler is also the default compilation class path
# (-Dscala.usejavacp=true); -classpath adds to it. JVM options can be given
# in JAVA_OPTS.
J=/usr/share/java
CP=$J/scala3-compiler-3.jar:$J/scala3-interfaces-3.jar:$J/tasty-core-3.jar:$J/scala-library-3.jar
CP=$CP:/usr/share/maven-repo/org/scala-lang/modules/scala-asm/debian/scala-asm-debian.jar
CP=$CP:$J/sbt-compiler-interface.jar:$J/sbt-util-interface.jar
# shellcheck disable=SC2086
exec java $JAVA_OPTS -cp "$CP" -Dscala.usejavacp=true -Dscala.expandjavacp=true \
  dotty.tools.MainGenericCompiler "$@"
