blob: 7127d6fe7890b8f2c7b600c4ac2a04b8ced11bf8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
#!/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
# dbcore template
./rebar create template=$TEMPLATE prefix=$PREFIX data_dir=$DATA view_dir=$VIEW user=$DBCORE_USER force=1
|