Mercurial > ec-dotfiles
changeset 440:abbdb936a36a
Automated pgsql yum version detect.
author | Edho Arief <edho@myconan.net> |
---|---|
date | Sun, 06 Jan 2013 13:52:11 +0300 |
parents | cb2d444253f4 |
children | a7a4142d0114 |
files | rc/bashrc |
diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/rc/bashrc Sun Jan 06 13:28:24 2013 +0300 +++ b/rc/bashrc Sun Jan 06 13:52:11 2013 +0300 @@ -29,9 +29,11 @@ # OpenBSD X11 test -d /usr/X11R6/bin && PATH="${PATH}:/usr/X11R6/bin" # PostgreSQL Yum -test -d /usr/pgsql-8.4 && PATH="/usr/pgsql-8.4/bin:${PATH}" -test -d /usr/pgsql-9.1 && PATH="/usr/pgsql-9.1/bin:${PATH}" -test -d /usr/pgsql-9.2 && PATH="/usr/pgsql-9.2/bin:${PATH}" +# Defaults to last version available. +_pgbindir=(/usr/pgsql-*/bin) +_pgbindir="${_pgbindir[@]:(-1)}" +test -d "${_pgbindir}" && PATH="${_pgbindir}:${PATH}" +unset _pgbindir # PostgreSQL EnterpriseDB # Defaults to last version available.