diff --git a/build.sbt b/build.sbt index 09dbbfa9e..90b7f7921 100644 --- a/build.sbt +++ b/build.sbt @@ -155,9 +155,11 @@ val root = (project in file(".")). val old = (stage in Universal).value val sd = (stagingDirectory in Universal).value val x = IO.read(sd / "bin" / "sbt-launch-lib.bash") - IO.write(sd / "bin" / "sbt-launch-lib.bash", x.replaceAllLiterally("declare init_sbt_version=", s"declare init_sbt_version=$sbtVersionToRelease")) + IO.write(sd / "bin" / "sbt-launch-lib.bash", x.replaceAllLiterally( + "declare init_sbt_version=_to_be_replaced", s"declare init_sbt_version=$sbtVersionToRelease")) val y = IO.read(sd / "bin" / "sbt.bat") - IO.write(sd / "bin" / "sbt.bat", y.replaceAllLiterally("set INIT_SBT_VERSION=", s"set INIT_SBT_VERSION=$sbtVersionToRelease")) + IO.write(sd / "bin" / "sbt.bat", y.replaceAllLiterally( + "set INIT_SBT_VERSION=_TO_BE_REPLACED", s"set INIT_SBT_VERSION=$sbtVersionToRelease")) old }, diff --git a/src/universal/bin/sbt-launch-lib.bash b/src/universal/bin/sbt-launch-lib.bash index 04824bf19..59d8af3d6 100755 --- a/src/universal/bin/sbt-launch-lib.bash +++ b/src/universal/bin/sbt-launch-lib.bash @@ -12,7 +12,7 @@ declare -a scalac_args declare -a sbt_commands declare java_cmd=java declare java_version -declare init_sbt_version= +declare init_sbt_version=_to_be_replaced declare SCRIPT=$0 while [ -h "$SCRIPT" ] ; do diff --git a/src/universal/bin/sbt.bat b/src/universal/bin/sbt.bat index 884248abc..6035dc357 100644 --- a/src/universal/bin/sbt.bat +++ b/src/universal/bin/sbt.bat @@ -53,7 +53,7 @@ rem We use the value of the JAVA_OPTS environment variable if defined, rather th set _JAVA_OPTS=%JAVA_OPTS% if "%_JAVA_OPTS%"=="" set _JAVA_OPTS=%CFG_OPTS% -set INIT_SBT_VERSION= +set INIT_SBT_VERSION=_TO_BE_REPLACED :args_loop if "%~1" == "" goto args_end