Last active
April 22, 2024 17:19
-
-
Save janl/5197524 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh -x | |
cd /tmp | |
if [ ! -d "geocouch" ]; then | |
git clone https://github.com/couchbase/geocouch.git | |
fi | |
cd geocouch | |
git checkout couchdb1.2.x | |
COUCH_EBIN="/usr/local/lib/couchdb/erlang/lib/couch-1.2.1/ebin" | |
COUCH_INCLUDE="/usr/local/lib/couchdb/erlang/lib/couch-1.2.1/include" | |
COUCH_SCRIPT="/usr/local/share/couchdb/www/script" | |
export ERL_COMPILER_OPTIONS="[{i, \"$COUCH_INCLUDE\"}]" | |
make | |
# install | |
mkdir -p /usr/local/etc/couchdb/default.d/ | |
cp ebin/* $COUCH_EBIN/ | |
cp etc/couchdb/default.d/geocouch.ini /usr/local/etc/couchdb/default.d/geocouch.ini | |
cp share/www/script/test/* $COUCH_SCRIPT/test/ | |
HAS_SPATIAL_TESTS=`grep spatial $COUCH_SCRIPT/couch_tests.js` | |
if [ -z "$HAS_SPATIAL_TESTS" ]; then | |
echo "\ | |
loadTest(\"spatial.js\"); \ | |
loadTest(\"list_spatial.js\"); \ | |
loadTest(\"etags_spatial.js\"); \ | |
loadTest(\"multiple_spatial_rows.js\"); \ | |
loadTest(\"spatial_compaction.js\"); \ | |
loadTest(\"spatial_design_docs.js\"); \ | |
loadTest(\"spatial_bugfixes.js\"); \ | |
loadTest(\"spatial_offsets.js\"); \ | |
">> $COUCH_SCRIPT/couch_tests.js | |
fi | |
echo "Done." |
gr2m
commented
Mar 19, 2013
now:
$ curl https://gist.github.com/janl/5197524/raw/92cddbf7f9df91be84b5a9c2b3fa253bda6fd633/install-geocouch.sh | sh
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1109 0 1109 0 0 979 0 --:--:-- 0:00:01 --:--:-- 1889
Already on 'couchdb1.2.x'
ERL_COMPILER_OPTIONS='[{i,[]},{i,"/usr/local/lib/couchdb/erlang/lib/couch-1.2.1/include"}]' ./rebar compile
==> geocouch (compile)
Done.
Installation GeoCouch:
$ curl https://gist.github.com/janl/5197524/raw/325c867617705a0bb2a976dcd6d8ceb7b0663d36/install-geocouch.sh | sh
then start any CouchDB (either just $ couchdb) or in a hoodie app, and go to futon and the test suite and scroll all the way down and run one of the spatial tests
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment