Revision 336465363433 () - Diff

Link to this snippet: https://friendpaste.com/5d1cbZglgi42AASqGg6dCg
Embed:
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
#!/bin/sh -ex

# cd into couchdb directory, run ./launch-multi-couch.sh N from there

N=$1

if [ -z "$N" ]; then
echo "usage: ./launch-multi-couch.sh N"
exit 1
fi

setup_couchdb()
{
N=$1
COUCHPATH="/tmp/couch$N"
./configure --prefix=$COUCHPATH
make -j4
make install
$COUCHPATH/bin/couchdb -b
sleep 1
PORT=`expr 5984 + $N`
curl -vX PUT http://127.0.0.1:5984/_config/httpd/port -d "\"$PORT\""
}

while([ $N -gt 0 ]); do
echo "Do CouchDB N=$N"
setup_couchdb $N


N=`expr $N - 1`
done

echo "Done"
# Done