Mercurial > hg > Feedworm
comparison backend/couchdb/CouchApp/feedworm/setup.sh @ 165:a5bda54309ba
add a couchapp for easy/automated setup
author | Dirk Olmes <dirk@xanthippe.ping.de> |
---|---|
date | Mon, 29 Aug 2011 04:12:01 +0200 |
parents | |
children | 98eaf0075a44 |
comparison
equal
deleted
inserted
replaced
164:3eeda7cec39b | 165:a5bda54309ba |
---|---|
1 #!/bin/bash | |
2 | |
3 | |
4 BASE_URL=${1:-http://localhost:5984} | |
5 DB_URL=${BASE_URL}/feedworm | |
6 | |
7 # create the database if it doesn't yet exist | |
8 curl -f "${DB_URL}" > /dev/null 2>&1 | |
9 if [ $? -gt 0 ]; then | |
10 echo -n "creating the database ... " | |
11 curl -X PUT ${DB_URL} | |
12 fi | |
13 | |
14 couchapp push local |