From f8ba89da217a1f1fd5c856a95a27a3e535017643 Mon Sep 17 00:00:00 2001 From: Josh Rosen Date: Sun, 15 Dec 2013 18:39:30 -0800 Subject: Fix Cygwin support in several scripts. This allows the spark-shell, spark-class, run-example, make-distribution.sh, and ./bin/start-* scripts to work under Cygwin. Note that this doesn't support PySpark under Cygwin, since that requires many additional `cygpath` calls from within Python and will be non-trivial to implement. This PR was inspired by, and subsumes, #253 (so close #253 after this is merged). --- spark-class | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'spark-class') diff --git a/spark-class b/spark-class index 4fa6fb864e..4eb95a9ba2 100755 --- a/spark-class +++ b/spark-class @@ -17,6 +17,11 @@ # limitations under the License. # +cygwin=false +case "`uname`" in + CYGWIN*) cygwin=true;; +esac + SCALA_VERSION=2.10 # Figure out where the Scala framework is installed @@ -125,6 +130,11 @@ fi # Compute classpath using external script CLASSPATH=`$FWDIR/bin/compute-classpath.sh` CLASSPATH="$SPARK_TOOLS_JAR:$CLASSPATH" + +if $cygwin; then + CLASSPATH=`cygpath -wp $CLASSPATH` + export SPARK_TOOLS_JAR=`cygpath -w $SPARK_TOOLS_JAR` +fi export CLASSPATH if [ "$SPARK_PRINT_LAUNCH_COMMAND" == "1" ]; then -- cgit v1.2.3