diff --git a/compiler/test-resources/scripting/argfileClasspath.sc b/compiler/test-resources/scripting/argfileClasspath.sc index c31371ba8934..73c473c7f966 100755 --- a/compiler/test-resources/scripting/argfileClasspath.sc +++ b/compiler/test-resources/scripting/argfileClasspath.sc @@ -1,4 +1,4 @@ -#!dist/target/pack/bin/scala @compiler/test-resources/scripting/cpArgumentsFile.txt +#!/usr/bin/env dist/target/pack/bin/scala @compiler/test-resources/scripting/cpArgumentsFile.txt import java.nio.file.Paths @@ -6,4 +6,3 @@ def main(args: Array[String]): Unit = val cwd = Paths.get(".").toAbsolutePath.toString.replace('\\', '/').replaceAll("/$", "") printf("cwd: %s\n", cwd) printf("classpath: %s\n", sys.props("java.class.path")) - diff --git a/compiler/test-resources/scripting/classpathReport.sc b/compiler/test-resources/scripting/classpathReport.sc index a9eacbbba1f7..f370bb8afed0 100755 --- a/compiler/test-resources/scripting/classpathReport.sc +++ b/compiler/test-resources/scripting/classpathReport.sc @@ -1,4 +1,4 @@ -#!bin/scala -classpath 'dist/target/pack/lib/*' +#!/usr/bin/env dist/target/pack/bin/scala -classpath 'dist/target/pack/lib/*' import java.nio.file.Paths @@ -9,4 +9,3 @@ def main(args: Array[String]): Unit = extension(s: String) def norm: String = s.replace('\\', '/') - diff --git a/compiler/test-resources/scripting/hashBang.sc b/compiler/test-resources/scripting/hashBang.sc index d767bd1a1592..584a90a2ae5a 100755 --- a/compiler/test-resources/scripting/hashBang.sc +++ b/compiler/test-resources/scripting/hashBang.sc @@ -1,4 +1,4 @@ -#!/usr/bin/env scala +#!/usr/bin/env dist/target/pack/bin/scala # comment STUFF=nada !# diff --git a/compiler/test-resources/scripting/hashBang.scala b/compiler/test-resources/scripting/hashBang.scala index 1aab26269f86..9f3d028e3087 100755 --- a/compiler/test-resources/scripting/hashBang.scala +++ b/compiler/test-resources/scripting/hashBang.scala @@ -1,4 +1,4 @@ -#!/usr/bin/env scala +#!/usr/bin/env dist/target/pack/bin/scala # comment STUFF=nada !# diff --git a/compiler/test-resources/scripting/mainClassOnStack.sc b/compiler/test-resources/scripting/mainClassOnStack.sc index a0c974555e76..d2db8e46e15a 100755 --- a/compiler/test-resources/scripting/mainClassOnStack.sc +++ b/compiler/test-resources/scripting/mainClassOnStack.sc @@ -1,4 +1,4 @@ -#!/usr/bin/env scala +#!/usr/bin/env dist/target/pack/bin/scala export STUFF=nada #lots of other stuff that isn't valid scala !# diff --git a/compiler/test-resources/scripting/mainClassOnStack.scala b/compiler/test-resources/scripting/mainClassOnStack.scala index 901cf5911892..65eba2ab1d68 100755 --- a/compiler/test-resources/scripting/mainClassOnStack.scala +++ b/compiler/test-resources/scripting/mainClassOnStack.scala @@ -1,4 +1,4 @@ -#!/usr/bin/env scala +#!/usr/bin/env dist/target/pack/bin/scala export STUFF=nada #lots of other stuff that isn't valid scala !# diff --git a/compiler/test-resources/scripting/scriptName.scala b/compiler/test-resources/scripting/scriptName.scala index 21aec32fe0bb..36d9f7d8d8f3 100755 --- a/compiler/test-resources/scripting/scriptName.scala +++ b/compiler/test-resources/scripting/scriptName.scala @@ -1,4 +1,4 @@ -#!/usr/bin/env scala +#!/usr/bin/env dist/target/pack/bin/scala def main(args: Array[String]): Unit = val name = Option(sys.props("script.name")) match { diff --git a/compiler/test-resources/scripting/scriptPath.sc b/compiler/test-resources/scripting/scriptPath.sc index 46cd5e8a7385..f47195e68286 100755 --- a/compiler/test-resources/scripting/scriptPath.sc +++ b/compiler/test-resources/scripting/scriptPath.sc @@ -1,4 +1,4 @@ -#!dist/target/pack/bin/scala +#!/usr/bin/env dist/target/pack/bin/scala def main(args: Array[String]): Unit = args.zipWithIndex.foreach { case (arg,i) => printf("arg %d: [%s]\n",i,arg) } diff --git a/compiler/test-resources/scripting/showArgs.sc b/compiler/test-resources/scripting/showArgs.sc index 28f16a9022b3..f398da8e4a6f 100755 --- a/compiler/test-resources/scripting/showArgs.sc +++ b/compiler/test-resources/scripting/showArgs.sc @@ -1,4 +1,4 @@ -#!/usr/bin/env scala +#!/usr/bin/env dist/target/pack/bin/scala // precise output format expected by BashScriptsTests.scala def main(args: Array[String]): Unit = diff --git a/compiler/test-resources/scripting/sqlDateError.sc b/compiler/test-resources/scripting/sqlDateError.sc index b9a47d245d1a..a3627d8cdb7e 100755 --- a/compiler/test-resources/scripting/sqlDateError.sc +++ b/compiler/test-resources/scripting/sqlDateError.sc @@ -1,4 +1,4 @@ -#!bin/scala -nosave +#!/usr/bin/env dist/target/pack/bin/scala -nosave def main(args: Array[String]): Unit = { println(new java.sql.Date(100L)) diff --git a/compiler/test-resources/scripting/touchFile.sc b/compiler/test-resources/scripting/touchFile.sc index 974f8a64d192..5e511f082a90 100755 --- a/compiler/test-resources/scripting/touchFile.sc +++ b/compiler/test-resources/scripting/touchFile.sc @@ -1,4 +1,4 @@ -#!/usr/bin/env scala +#!/usr/bin/env dist/target/pack/bin/scala import java.io.File diff --git a/compiler/test-resources/scripting/unglobClasspath.sc b/compiler/test-resources/scripting/unglobClasspath.sc index 796697cdedf2..3d24327ea896 100755 --- a/compiler/test-resources/scripting/unglobClasspath.sc +++ b/compiler/test-resources/scripting/unglobClasspath.sc @@ -1,4 +1,4 @@ -#!bin/scala -classpath 'dist/target/pack/lib/*' +#!/usr/bin/env dist/target/pack/bin/scala -classpath 'dist/target/pack/lib/*' // won't compile unless the hashbang line sets classpath import org.jline.terminal.Terminal