mesos/spark — pull request #292 by tomdz (2012-10-22 20:15:56+00:00)
Title: Tweaked run file to live more happily with typesafe's debian package

The `run` script assumes a single-directory Scala installation structure with a `bin` and `lib` subdirectory. Unfortunately, that does not work well with Typesafe's Scala debian package which has this layout:
```
$ dpkg -L scala
/.
/usr
/usr/bin
/usr/bin/scalap
/usr/bin/scalac
/usr/bin/scala
/usr/bin/scaladoc
/usr/bin/fsc
/usr/share
/usr/share/scala
/usr/share/scala/plugins
/usr/share/scala/plugins/continuations.jar
/usr/share/java
/usr/share/java/scala-partest.jar
/usr/share/java/scala-swing.jar
/usr/share/java/scala-dbc.jar
/usr/share/java/jline.jar
/usr/share/java/scalacheck.jar
/usr/share/java/scala-library.jar
/usr/share/java/scala-compiler.jar
/usr/share/java/scalap.jar
/usr/share/doc
/usr/share/doc/scala
/usr/share/doc/scala/changelog.gz
/usr/share/doc/scala/copyright
/usr/share/man
/usr/share/man/man1
/usr/share/man/man1/fsc.1.gz
/usr/share/man/man1/scalap.1.gz
/usr/share/man/man1/scalac.1.gz
/usr/share/man/man1/scaladoc.1.gz
/usr/share/man/man1/scala.1.gz
```
This pull request changes the run script to:
* Use the `scala` binary as is if it is in the path, otherwise require `SCALA_HOME`
* Require either `SCALA_LIBRARY_PATH`, or if that is not defined, `SCALA_HOME` for running with `java` instead of `scala`