From: Sebastian Harl Date: Mon, 29 Oct 2012 13:40:39 +0000 (+0100) Subject: pgtest.sh: Make it possible to specify PG_CONFIG thru the environment. X-Git-Url: https://git.tokkee.org/?p=postrr.git;a=commitdiff_plain;h=a5d07fff4ae446abd56a0d3444365bd36191b9f3 pgtest.sh: Make it possible to specify PG_CONFIG thru the environment. --- diff --git a/pgtest.sh b/pgtest.sh index be58830..8cbb27c 100755 --- a/pgtest.sh +++ b/pgtest.sh @@ -26,13 +26,15 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -PG_CONFIG=`which pg_config` +if test -z "$PG_CONFIG"; then + PG_CONFIG=`which pg_config` +fi if test -z "$PG_CONFIG"; then echo "pg_config not found!" >&2 exit 1 fi -BIN_DIR=`pg_config --bindir` +BIN_DIR=`$PG_CONFIG --bindir` if test -z "$TARGET"; then TARGET=`pwd`/target fi