Adding test for PostgreSQL repo RPM
authorChris Sharp <csharp@georgialibraries.org>
Fri, 20 Dec 2013 02:24:21 +0000 (21:24 -0500)
committerChris Sharp <csharp@georgialibraries.org>
Fri, 20 Dec 2013 02:24:21 +0000 (21:24 -0500)
Open-ILS/src/extras/install/Makefile.centos

index bb9bb88..0c2c541 100644 (file)
@@ -90,13 +90,14 @@ all: add_pgsql_repo install_centos_rpms install_js_sm
        make -f $(DIR)/Makefile.common install_cpan_force
 
 add_pgsql_repo:
-       if [ ! -z $(CENTOS_64) ]; then \
-               wget $(PGSQL_64_REPO_URL)/$(PGSQL_REPO_RPM) ; \
-       else \
-               wget $(PGSQL_REPO_URL)/$(PGSQL_REPO_RPM) ; \
-       fi ; \
-       rpm -ivh $(PGSQL_REPO_RPM)
-               
+       if [ ! rpm -qa | grep pgdg-centos ]; then \
+               if [ ! -z $(CENTOS_64) ]; then \
+                       wget $(PGSQL_64_REPO_URL)/$(PGSQL_REPO_RPM) ; \
+               else \
+                       wget $(PGSQL_REPO_URL)/$(PGSQL_REPO_RPM) ; \
+               fi ; \
+               rpm -ivh $(PGSQL_REPO_RPM) \
+       fi ;    
 install_postgres_server:
        yum -y install $(PGSQL_CENTOS_RPMS)