gitlab-build-images/scripts/install-pgbouncer
Pavlo Strokov 48c98a5191 Adding of PgBouncer
Fix installation script of PgBouncer.
Single download + removal of all tmp data.

Related to: https://gitlab.com/gitlab-org/gitaly/-/issues/2816
2020-07-16 00:46:52 +03:00

19 lines
511 B
Bash
Executable file

#!/bin/bash
PGBOUNCER_VERSION=${1}
PGBOUNCER_DOWNLOAD_SHA256=${2}
PGBOUNCER_DOWNLOAD_URL="https://pgbouncer.github.io/downloads/files/$PGBOUNCER_VERSION/pgbouncer-$PGBOUNCER_VERSION.tar.gz"
curl -o pgbouncer.tar.gz -fsSL $PGBOUNCER_DOWNLOAD_URL
echo "${PGBOUNCER_DOWNLOAD_SHA256} pgbouncer.tar.gz" | sha256sum -c -
tar xfz pgbouncer.tar.gz
rm -f pgbouncer.tar.gz
cd pgbouncer-${PGBOUNCER_VERSION}
./configure --prefix=/usr/local
make
cp pgbouncer /usr/local/bin
cd ..
rm -rf pgbouncer-${PGBOUNCER_VERSION}