aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Chan <ev@ooyala.com>2013-06-24 17:05:37 -0700
committerEvan Chan <ev@ooyala.com>2013-06-24 17:05:37 -0700
commit81df20e5b44407c8c321471be2faee4bf6853fd6 (patch)
tree83680057afa1f7a9d3c4a78a9f89d2e9a7413bbf
parent0bcaf036050c3d2b4389339927239e0e35bf02ff (diff)
downloadspark-81df20e5b44407c8c321471be2faee4bf6853fd6.tar.gz
spark-81df20e5b44407c8c321471be2faee4bf6853fd6.tar.bz2
spark-81df20e5b44407c8c321471be2faee4bf6853fd6.zip
Script to create binary distribution for Spark
-rwxr-xr-xmake-distribution.sh30
1 files changed, 30 insertions, 0 deletions
diff --git a/make-distribution.sh b/make-distribution.sh
new file mode 100755
index 0000000000..34f6d4a36b
--- /dev/null
+++ b/make-distribution.sh
@@ -0,0 +1,30 @@
+#!/bin/bash
+#
+# Script to create a binary distribution for easy deploys of Spark.
+# The distribution directory defaults to dist/ but can be overridden below.
+# The distribution contains fat (assembly) jars that include the Scala library,
+# so it is completely self contained.
+
+# Figure out where the Spark framework is installed
+FWDIR="$(cd `dirname $0`; pwd)"
+DISTDIR="$FWDIR/dist"
+
+# Get version from SBT
+VERSION=$($FWDIR/sbt/sbt "show version" | tail -1 | cut -f 2)
+echo "Making distribution for Spark $VERSION in $DISTDIR..."
+
+# Build fat JAR
+$FWDIR/sbt/sbt "repl/assembly"
+
+# Make directories
+rm -rf "$DISTDIR"
+mkdir -p "$DISTDIR/jars"
+echo "$VERSION" >$DISTDIR/RELEASE
+
+# Copy jars
+cp $FWDIR/repl/target/*.jar "$DISTDIR/jars/"
+
+# Copy other things
+cp -r "$FWDIR/bin" "$DISTDIR"
+cp -r "$FWDIR/conf" "$DISTDIR"
+cp "$FWDIR/run" "$FWDIR/spark-shell" "$DISTDIR" \ No newline at end of file