diff options
author | Matthew de Detrich <mdedetrich@gmail.com> | 2018-05-18 23:53:41 +0200 |
---|---|---|
committer | Li Haoyi <haoyi.sg@gmail.com> | 2018-05-18 14:53:41 -0700 |
commit | 8662913c97fdff051a3970bace0b0d6e5ef7d3cd (patch) | |
tree | 3bf7eb883013a9d5ca03412176a60b063f6cbf28 /main/src/mill/modules/Jvm.scala | |
parent | e69ebcc92dc71f002119cebf4d9b61874bdd4a66 (diff) | |
download | mill-8662913c97fdff051a3970bace0b0d6e5ef7d3cd.tar.gz mill-8662913c97fdff051a3970bace0b0d6e5ef7d3cd.tar.bz2 mill-8662913c97fdff051a3970bace0b0d6e5ef7d3cd.zip |
Allow shebang with launcherUniversalScript (#338)
Diffstat (limited to 'main/src/mill/modules/Jvm.scala')
-rw-r--r-- | main/src/mill/modules/Jvm.scala | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/main/src/mill/modules/Jvm.scala b/main/src/mill/modules/Jvm.scala index 9e22f614..d32d3612 100644 --- a/main/src/mill/modules/Jvm.scala +++ b/main/src/mill/modules/Jvm.scala @@ -342,12 +342,14 @@ object Jvm { def launcherUniversalScript(mainClass: String, shellClassPath: Agg[String], cmdClassPath: Agg[String], - jvmArgs: Seq[String]) = { + jvmArgs: Seq[String], + shebang: Boolean = false) = { universalScript( shellCommands = s"""exec java ${jvmArgs.mkString(" ")} $$JAVA_OPTS -cp "${shellClassPath.mkString(":")}" $mainClass "$$@"""", cmdCommands = s"""java ${jvmArgs.mkString(" ")} %JAVA_OPTS% -cp "${cmdClassPath.mkString(";")}" $mainClass %*""", + shebang = shebang ) } def createLauncher(mainClass: String, |