#!/bin/sh POSTGRESQL_VERSION=`pg_config --version | awk '{print $2}'` cd /tmp test -e /tmp/postgresql-$POSTGRESQL_VERSION.tar.bz2 || wget http://ftp9.us.postgresql.org/pub/mirrors/postgresql/source/v$POSTGRESQL_VERSION/postgresql-$POSTGRESQL_VERSION.tar.bz2 test -d /tmp/postgresql-$POSTGRESQL_VERSION || tar zxvf postgresql-$POSTGRESQL_VERSION.tar.bz2 cd postgresql-$POSTGRESQL_VERSION && eval ./configure `pg_config --configure` && make cd contrib/unaccent && make && make install cd .. cd contrib/pg_trgm && make && make install cd .. cd contrib/fuzzystrmatch && make && make install