From: Bill Erickson Date: Wed, 19 Nov 2014 21:42:02 +0000 (-0500) Subject: trusty: added -p command to install pg 9.2 server (testing pending) X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=d19fbd3f6bd85a02d31fb824b13500f8abe2796c;p=working%2Frandom.git trusty: added -p command to install pg 9.2 server (testing pending) Signed-off-by: Bill Erickson --- diff --git a/installer/trusty/eg_trusty_installer.sh b/installer/trusty/eg_trusty_installer.sh index cf496b29b..a2fba448c 100755 --- a/installer/trusty/eg_trusty_installer.sh +++ b/installer/trusty/eg_trusty_installer.sh @@ -14,7 +14,7 @@ # GNU General Public License for more details. # ----------------------------------------------------------------------- -while getopts aystbd option +while getopts aystbdp option do case "${option}" in @@ -24,6 +24,7 @@ do t) LIVETEST=1;; b) NO_BROWSER=1;; d) NO_DATABASE=1;; + p) PG_92=1;; esac done @@ -243,10 +244,28 @@ function evergreen_db_prereqs { fi; echo _.-~= Installing Evergreen database pre-requisites date - if [ $YES ]; then - yes | make -f /home/opensrf/Evergreen/Open-ILS/src/extras/Makefile.install ${EVERGREEN_DB_PREREQ_TARGET} - else - make -f /home/opensrf/Evergreen/Open-ILS/src/extras/Makefile.install ${EVERGREEN_DB_PREREQ_TARGET} + + if [ -n "$PG_92" ]; then + # ubuntu installs 9.3 by default. + # fetch 9.2 builds directly from postgres + echo -e "\ndeb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main" \ + >> /etc/apt/sources.list + wget --quiet -O - \ + https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - + apt-get update + + PG_COM="apt-get install postgresql-9.2 postgresql-contrib-9.2 postgresql-plperl-9.2 postgresql-server-dev-9.2" + if [ $YES ]; then + yes | $PG_COM + else + $PG_COM + fi; + else + if [ $YES ]; then + yes | make -f /home/opensrf/Evergreen/Open-ILS/src/extras/Makefile.install ${EVERGREEN_DB_PREREQ_TARGET} + else + make -f /home/opensrf/Evergreen/Open-ILS/src/extras/Makefile.install ${EVERGREEN_DB_PREREQ_TARGET} + fi; fi; echo Return Value = $? echo End of Installing Evergreen database pre-requisites =~-._