2012-11-07 20:41:26 +00:00
|
|
|
#!/usr/bin/env bash
|
2012-09-17 21:14:55 +00:00
|
|
|
|
2012-09-19 20:03:48 +00:00
|
|
|
ORIGDIR=`pwd`
|
|
|
|
pushd `dirname $0` > /dev/null
|
|
|
|
SCRIPT_DIR=`pwd`
|
|
|
|
popd > /dev/null
|
2014-09-16 20:12:55 +00:00
|
|
|
: ${CURRENT_OTP:=$HOME/erlang-R16B02}
|
|
|
|
: ${RT_CURRENT_TAG:=""}
|
|
|
|
|
2012-09-19 20:03:48 +00:00
|
|
|
|
2012-09-19 20:19:59 +00:00
|
|
|
if [ -n "$DEBUG_RTDEV" ]; then
|
2012-09-19 20:10:57 +00:00
|
|
|
echo "= Configuration ================================================="
|
2012-09-19 20:03:48 +00:00
|
|
|
echo "Build dir: $ORIGDIR"
|
|
|
|
echo "rtdev-* scripts: $SCRIPT_DIR"
|
|
|
|
echo "Erlang: $CURRENT_OTP"
|
2012-09-19 20:10:57 +00:00
|
|
|
echo
|
2012-09-19 20:03:48 +00:00
|
|
|
fi
|
|
|
|
|
2012-09-17 21:14:55 +00:00
|
|
|
echo "================== riak_test Omnibus Installer =================="
|
|
|
|
echo
|
|
|
|
echo "This is an omnibus script that builds all the necessary versions "
|
|
|
|
echo "of Erlang and Riak (including the latest from Github) for running"
|
2013-01-23 16:43:19 +00:00
|
|
|
echo "riak_test and installs them into $HOME/rt/riak. "
|
2012-09-17 21:14:55 +00:00
|
|
|
echo
|
|
|
|
echo -n "Are you sure you want to continue? [Y|n] "
|
|
|
|
read continue
|
|
|
|
if [[ $continue == n || $continue == N ]]; then
|
|
|
|
echo
|
|
|
|
echo "Aborting install!"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo
|
|
|
|
echo "= Building Riak Releases ========================================"
|
|
|
|
echo
|
|
|
|
|
|
|
|
source $SCRIPT_DIR/rtdev-build-releases.sh
|
|
|
|
|
|
|
|
echo "= Installing Riak Releases ======================================"
|
|
|
|
echo
|
|
|
|
source $SCRIPT_DIR/rtdev-setup-releases.sh
|
|
|
|
|
2012-09-19 19:27:22 +00:00
|
|
|
echo
|
|
|
|
echo "= Building and Installing Riak from Git ========================="
|
|
|
|
echo
|
|
|
|
|
|
|
|
cd $ORIGDIR
|
2014-09-16 20:12:55 +00:00
|
|
|
build "current" $CURRENT_OTP $RT_CURRENT_TAG
|
2012-09-19 19:27:22 +00:00
|
|
|
echo
|
|
|
|
cd current
|
|
|
|
source $SCRIPT_DIR/rtdev-current.sh
|
|
|
|
|
2012-09-17 21:14:55 +00:00
|
|
|
cd $ORIGDIR
|
2012-09-17 21:33:50 +00:00
|
|
|
echo
|
|
|
|
echo "= Build complete! ==============================================="
|