diff options
author | Brad Anderson <brad@cloudant.com> | 2010-08-18 16:48:50 -0400 |
---|---|---|
committer | Adam Kocoloski <adam@cloudant.com> | 2010-08-18 17:19:38 -0400 |
commit | bb9e2cef0c8f681dc38e09ee4e427649d89d1b44 (patch) | |
tree | 32230aa62f2b3941f03e9ff91727efe8a430ecac /configure | |
parent | 6d18638d747374cb0e90e9bcbefbc71d959254fd (diff) |
lay down cloudant build system.
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/configure b/configure new file mode 100755 index 00000000..e758f798 --- /dev/null +++ b/configure @@ -0,0 +1,51 @@ +#!/bin/bash + +function quit { + exit +} + +PREFIX="/opt" +TEMPLATE="production" +DATA="/srv/db" +VIEW="/srv/view_index" +DBCORE_USER=`whoami` + +while [ $# -gt 0 ] +do + case $1 + in + -p) + PREFIX=$2 + shift 2 + ;; + -t) + TEMPLATE=$2 + shift 2 + ;; + -d) + DATA=$2 + shift 2 + ;; + -v) + VIEW=$2 + shift 2 + ;; + -u) + DBCORE_USER=$2 + shift 2 + ;; + *) + echo "usage: $0 [-p {prefix} -t {template} -d {data_dir} -v {view_dir} -u {user}]" + quit + ;; + esac +done + + +echo "configuring dbcore" + +rm -f rebar.config +# Makefile +./rebar create template=make prefix=$PREFIX data=$DATA view=$VIEW user=$DBCORE_USER force=1 +# dbcore template +./rebar create template=$TEMPLATE prefix=$PREFIX force=1 |