Permalink
Browse files

Add src-pkg script

This script will build a source package of Riak/Yokozuna.  This should
make it easier for users to try Yokozuna.
  • Loading branch information...
1 parent f555d1b commit 599d2fd3c84c6c7469d5e89e90f4c1535d157668 @rzezeski committed Feb 3, 2013
Showing with 53 additions and 0 deletions.
  1. +53 −0 tools/src-pkg.sh
View
@@ -0,0 +1,53 @@
+#!/bin/bash
+#
+# Build a source package of Yokozuna.
+#
+#> Usage:
+#>
+#> ./src-pkg.sh <working dir> <version>
+#>
+#> Example:
+#>
+#> ./src-pkg.sh /tmp 0.3.0
+
+usage() {
+ echo
+ grep '#>' $0 | tr -d '#>' | sed '$d'
+}
+
+error() {
+ echo ERROR: $1
+ usage
+ exit 1
+}
+
+if [ ! $# -eq 2 ]; then
+ error "incorrect number of arguments"
+fi
+
+WD=$1; shift
+VSN=$1
+RIAK_DIR=riak-yokozuna-$VSN-src
+TGZ=$RIAK_DIR.tar.gz
+
+pushd $WD
+git clone git://github.com/basho/riak.git $RIAK_DIR
+pushd $RIAK_DIR
+git checkout rz-yokozuna-2
+make deps
+pushd deps/riak_kv
+git checkout yz-merge
+popd
+pushd deps/yokozuna
+git checkout v$VSN
+./priv/grab-solr.sh
+rm -rf priv/solr-4*
+popd
+popd
+
+rm -f $TGZ
+tar -zcvf $TGZ $RIAK_DIR
+popd
+
+
+

0 comments on commit 599d2fd

Please sign in to comment.