From 5337514c63b02b59ade232a1fafe77f3a8367382 Mon Sep 17 00:00:00 2001 From: Dave Page Date: Mon, 18 May 2020 10:22:28 +0100 Subject: [PATCH] Allow the base directory for the repo to be overridden from the environment. --- pkg/redhat/repo-rpm.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkg/redhat/repo-rpm.sh b/pkg/redhat/repo-rpm.sh index e869cbd59..781222cf7 100755 --- a/pkg/redhat/repo-rpm.sh +++ b/pkg/redhat/repo-rpm.sh @@ -4,6 +4,12 @@ REPO_RPM_VERSION=1 REPO_RPM_BUILD=1 +# Set the repo base directory +if [ "x${PGADMIN_REPO_DIR}" == "x" ]; then + echo "PGADMIN_REPO_DIR not set. Setting it to the default: https://ftp.postgresql.org/pub/pgadmin/pgadmin4/repos/yum" + export PGADMIN_REPO_DIR=https://ftp.postgresql.org/pub/pgadmin/pgadmin4/repos/yum +fi + # Exit when any command fails set -e @@ -44,7 +50,7 @@ _create_repo_rpm() { cat << EOF > "${BUILDROOT}/${DISTRO}-repo/etc/yum.repos.d/pgadmin4.repo" [pgAdmin4] name=pgadmin4 -baseurl=https://ftp.postgresql.org/pub/pgadmin/pgadmin4/repos/yum/${DISTRO}/${PLATFORM}-\$RELEASEVER-\$BASEARCH +baseurl=${PGADMIN_REPO_DIR}/${DISTRO}/${PLATFORM}-\$RELEASEVER-\$BASEARCH enabled=1 EOF