Support alternative sbt-launch repo

Problem
-------
Not everyone has direct access to Maven Central.

Solution
--------
Provide an env variable to override the base URL for sbt launcher.
This commit is contained in:
Eugene Yokota 2021-04-22 23:42:46 -04:00
parent 068700b11e
commit eaab122576
1 changed files with 5 additions and 1 deletions

6
sbt
View File

@ -98,7 +98,11 @@ jar_file () {
}
jar_url () {
echo "https://repo1.maven.org/maven2/org/scala-sbt/sbt-launch/$1/sbt-launch-$1.jar"
local repo_base="$SBT_LAUNCH_REPO"
if [[ $repo_base == "" ]]; then
repo_base="https://repo1.maven.org/maven2"
fi
echo "$repo_base/org/scala-sbt/sbt-launch/$1/sbt-launch-$1.jar"
}
download_url () {