Skip to content

Commit

Permalink
Obtain baseDir through more portable means.
Browse files Browse the repository at this point in the history
`readlink -f` does not work on OS X.

This commit replaces the use of `readlink -f` with something more
portable.

While this approach may not always fully resolve symlinks, it should be
fine since java seems to resolve symlinks.
  • Loading branch information
Andre Eriksson committed Jan 12, 2015
1 parent a732966 commit 9db3b86
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion project/Build.scala
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ object IScalaBuild extends Build {
}
},
userScripts := {
val baseDir = "$(dirname $(dirname $(readlink -f $0)))"
val baseDir = "$(cd "$(dirname $(dirname "$0"))" && pwd)"
val jarName = {
import SbtAssembly.AssemblyKeys.{assembly,jarName=>jar}
(jar in assembly).value
Expand Down

0 comments on commit 9db3b86

Please sign in to comment.