-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
33 additions
and
8 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
# Determine the version of PostgreSQL (and append .0 to a single digit) | ||
if [ -z ${1+x} ]; then | ||
echo "ERROR: No PostgreSQL version number passed to $0" | ||
echo "Usage:" | ||
echo " $0 \$PGVERSION" | ||
exit 2 | ||
fi | ||
|
||
PGVERSION=${1:-} | ||
[[ $PGVERSION =~ ^[0-9]$ ]] && PGVERSION+=.0 | ||
|
||
apt-get update | ||
apt-get install -y --no-install-recommends \ | ||
build-essential clang llvm llvm-dev llvm-runtime cmake \ | ||
ca-certificates gnupg2 curl libicu-dev libxml2 locales ssl-cert | ||
apt-get -y purge postgresql-client-common | ||
|
||
curl https://salsa.debian.org/postgresql/postgresql-common/-/raw/master/pgdg/apt.postgresql.org.sh -O --output-dir /usr/local/bin/ | ||
chmod +x /usr/local/bin/apt.postgresql.org.sh | ||
|
||
apt.postgresql.org.sh -i -v "$PGVERSION" | ||
apt-get -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" install -y "${@:2}" |
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