mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-26 10:53:44 +03:00
Install postgres from pgdg on travis if available there
This commit is contained in:
parent
f08019e356
commit
58654990d6
|
@ -39,9 +39,21 @@ create () {
|
||||||
|
|
||||||
# install postgres versions not available on the image
|
# install postgres versions not available on the image
|
||||||
if [[ ! -d "${PGDIR}" ]]; then
|
if [[ ! -d "${PGDIR}" ]]; then
|
||||||
wget -O - http://initd.org/psycopg/upload/postgresql/postgresql-${PACKAGE}-$(lsb_release -cs).tar.bz2 \
|
if (( "$VERNUM" >= 904 )); then
|
||||||
|
# A versiou supported by postgres
|
||||||
|
if [[ ! "${apt_updated:-}" ]]; then
|
||||||
|
apt_updated="yeah"
|
||||||
|
sudo apt-get update -y
|
||||||
|
fi
|
||||||
|
sudo apt-get install -y \
|
||||||
|
postgresql-server-dev-${VERSION} postgresql-${VERSION}
|
||||||
|
else
|
||||||
|
# A dinosaur
|
||||||
|
wget -O - \
|
||||||
|
http://initd.org/psycopg/upload/postgresql/postgresql-${PACKAGE}-$(lsb_release -cs).tar.bz2 \
|
||||||
| sudo tar xjf - -C /usr/lib/postgresql
|
| sudo tar xjf - -C /usr/lib/postgresql
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
sudo -u postgres "$PGBIN/initdb" -D "$DATADIR"
|
sudo -u postgres "$PGBIN/initdb" -D "$DATADIR"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user