mirror of https://github.com/sbt/sbt.git
detect $init_sbt_version
This commit is contained in:
parent
fb30f81f89
commit
ab3de739d7
|
|
@ -170,6 +170,10 @@ process_args () {
|
|||
}
|
||||
|
||||
syncPreloaded() {
|
||||
if [[ "$init_sbt_version" == "" ]]; then
|
||||
# FIXME: better $init_sbt_version detection
|
||||
init_sbt_version="$(ls -1 "$sbt_home/lib/local-preloaded/org.scala-sbt/sbt/")"
|
||||
fi
|
||||
[[ -f "$HOME/.sbt/preloaded/org.scala-sbt/sbt/$init_sbt_version/jars/sbt.jar" ]] || {
|
||||
# lib/local-preloaded exists (This is optional)
|
||||
[[ -d "$sbt_home/lib/local-preloaded/" ]] && {
|
||||
|
|
|
|||
|
|
@ -143,6 +143,12 @@ if /I "%JAVA_VERSION%" GEQ "9" (
|
|||
exit /B 0
|
||||
|
||||
:sync_preloaded
|
||||
if "%INIT_SBT_VERSION%"=="" (
|
||||
rem FIXME: better %INIT_SBT_VERSION% detection
|
||||
FOR /F "tokens=* USEBACKQ" %%F IN (`dir /b "%SBT_HOME%\..\lib\local-preloaded\org.scala-sbt\sbt" /B`) DO (
|
||||
SET INIT_SBT_VERSION=%%F
|
||||
)
|
||||
)
|
||||
set PRELOAD_SBT_JAR="%UserProfile%\.sbt\preloaded\org.scala-sbt\sbt\%INIT_SBT_VERSION%\jars\sbt.jar"
|
||||
if /I "%JAVA_VERSION%" GEQ "1.8" (
|
||||
where robocopy >nul 2>nul
|
||||
|
|
|
|||
Loading…
Reference in New Issue