Skip to content

Commit

Permalink
Use a more portable shebang
Browse files Browse the repository at this point in the history
  • Loading branch information
mantognini committed Nov 13, 2017
1 parent 321e140 commit 8c96c0e
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,13 @@ script := {

val paths = res.getAbsolutePath +: out.getAbsolutePath +: cps.map(_.data.absolutePath)
val cp = paths.mkString(System.getProperty("path.separator"))
IO.write(file, s"""|#!/bin/bash --posix
|
|SCALACLASSPATH=$cp
|
|java -Xmx2G -Xms512M -Xss64M -classpath "$${SCALACLASSPATH}" -Dscala.usejavacp=true inox.Main $$@ 2>&1
|""".stripMargin)
IO.write(file, s"""|#!/usr/bin/env bash
|set -o posix
|
|SCALACLASSPATH=$cp
|
|java -Xmx2G -Xms512M -Xss64M -classpath "$${SCALACLASSPATH}" -Dscala.usejavacp=true inox.Main $$@ 2>&1
|""".stripMargin)
file.setExecutable(true)
} catch {
case e: Throwable =>
Expand Down

0 comments on commit 8c96c0e

Please sign in to comment.