diff --git a/docs/ref/contrib/gis/create_template_postgis-debian.sh b/docs/ref/contrib/gis/create_template_postgis-debian.sh
index 61bbef4..2d9e98d 100755
a
|
b
|
if [ -d "/usr/share/postgresql-8.3-postgis" ]
|
5 | 5 | then |
6 | 6 | POSTGIS_SQL_PATH=/usr/share/postgresql-8.3-postgis |
7 | 7 | POSTGIS_SQL=lwpostgis.sql |
| 8 | GEOGRAPHY=0 |
8 | 9 | fi |
9 | 10 | |
10 | 11 | # For Ubuntu 10.04 |
… |
… |
if [ -d "/usr/share/postgresql/8.4/contrib" ]
|
12 | 13 | then |
13 | 14 | POSTGIS_SQL_PATH=/usr/share/postgresql/8.4/contrib |
14 | 15 | POSTGIS_SQL=postgis.sql |
| 16 | GEOGRAPHY=0 |
15 | 17 | fi |
16 | 18 | |
17 | 19 | # For Ubuntu 10.10 (with PostGIS 1.5) |
… |
… |
then
|
20 | 22 | POSTGIS_SQL_PATH=/usr/share/postgresql/8.4/contrib/postgis-1.5 |
21 | 23 | POSTGIS_SQL=postgis.sql |
22 | 24 | GEOGRAPHY=1 |
23 | | else |
24 | | GEOGRAPHY=0 |
| 25 | fi |
| 26 | |
| 27 | # For Ubuntu 11.10 / Linux Mint 12 (with PostGIS 1.5) |
| 28 | if [ -d "/usr/share/postgresql/9.1/contrib/postgis-1.5" ] |
| 29 | then |
| 30 | POSTGIS_SQL_PATH=/usr/share/postgresql/9.1/contrib/postgis-1.5 |
| 31 | POSTGIS_SQL=postgis.sql |
| 32 | GEOGRAPHY=1 |
25 | 33 | fi |
26 | 34 | |
27 | 35 | createdb -E UTF8 template_postgis && \ |
28 | | createlang -d template_postgis plpgsql && \ |
| 36 | ( createlang -d template_postgis -l | grep plpgsql || createlang -d template_postgis plpgsql ) && \ |
29 | 37 | psql -d postgres -c "UPDATE pg_database SET datistemplate='true' WHERE datname='template_postgis';" && \ |
30 | 38 | psql -d template_postgis -f $POSTGIS_SQL_PATH/$POSTGIS_SQL && \ |
31 | 39 | psql -d template_postgis -f $POSTGIS_SQL_PATH/spatial_ref_sys.sql && \ |