diff --git a/scripts/install-postgresql b/scripts/install-postgresql index 4c655c4..8eeaf26 100755 --- a/scripts/install-postgresql +++ b/scripts/install-postgresql @@ -23,6 +23,20 @@ function build_debian() { rm -rf /var/lib/apt/lists/* } +function build_ubi() { + UBI_VERSION=$(lsb_release -a | awk '/Release/ { print $2 }') + UBI_MAJOR_VERSION=${UBI_VERSION%.*} # strip last component + + yum install -y "https://download.postgresql.org/pub/repos/yum/reporpms/EL-${UBI_MAJOR_VERSION}-x86_64/pgdg-redhat-repo-latest.noarch.rpm" + + yum update -y + + yum install -y postgresql${POSTGRES_VERSION} + + yum autoremove -y + yum clean -y all +} + BUILD_OS=${BUILD_OS:-debian} if [[ $BUILD_OS =~ debian ]]; then