disabled
  /   ˆ{‹„„-i[D<†ªoZƒ›Ù«Â587_‘I|¥‰ÓMdœv ©ƒ†ü+=ÂÁ K    ‹      Í–QoÚ0Çßû)n~Ø[rq
£!SG�†JµLÓ4íÁÄ†Xqä¸eÝ§_B Ðh§mUŸb;ÿ»üöY—àM4êN¾Œ{ðqr9€ñ§ƒ~ˆ…øÙë"F“¨~áÛEì	�Ä˜¼�¸\.í¥g+=ÇÉ&f‘úX-ccsÃIxTká	‰`¼|B`¤IEØÏ¸øj¨nM!¹ðQ˜*“&ÀZSFá:,˜*~_e£OD–‚ÕGØt• ê00	Ü±TÎ³1*'a s(tÜ!(c•8MYvcÏåŒ KM‡|íwGßJš¤Š‰³yßíÏF�sÙBÈök.kÍ€ŠË™ü øº_Ë‡Fµ&E¬en¤Ê¶R,wQc•9+Y%A¢wUµ„?µ,~´ãó«Þpõ¯ê-áUŠ­»Çç@Â1Ó"3I-b£ôýÚhõ6›ùÙf
kZÎCB ö*ÿÀûmv“©e¶k¿Üš½ÆW%£c›ç7s‹Ë¢tðÛÒ®ù_ÜºŽëYŽkQ\§íø ‡°¨wñòX0Ç|Ëñ-êõÛç ‚g7ÿa¦R.ô.Á¡Š2b‘§Ìˆ¢¬¦íøÉ£xg¹- �¶szø(þA…=Ÿã¡šp§²ŽsÐ–åœZÔÚl{¯…£”ÏVëÁq·"p(P·Ý8r)^œÀYÕ6Óã4ÍÅ¢´º~ë5Ñ°;&ÓŠ`Ã³]øÿ7å™Ý×}8ÀUÿ°þø	•�­p        ˆÅ‘äÇò 8àcnÊã.ŸÏÄƒh¹ÃÂÁ      disabled
  6   ˆl–Ãa¾”*i?u8 Y¸î41hß�þDÔ¯,ã€Í:I]d þÅƒ}§ÄÃÂ $ø    #!/bin/bash

# Create a throw-away PostgreSQL environment for running regression tests.
# This does not interfere with existing clusters.
#
# (C) 2005-2012 Martin Pitt <mpitt@debian.org>
# (C) 2012-2020 Christoph Berg <myon@debian.org>
#
#  This program is free software; you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation; either version 2 of the License, or
#  (at your option) any later version.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.

set -e # no -u here as that breaks PGCONF_OPTS[@]

# wrap ourselves in newpid if requested
if [ "$PG_VIRTUALENV_NEWPID" ]; then
    unset PG_VIRTUALENV_NEWPID
    exec newpid $0 "$@"
fi

# wrap ourselves in unshare if requested
if [ "$PG_VIRTUALENV_UNSHARE" ]; then
    export _PG_VIRTUALENV_UNSHARE="$PG_VIRTUALENV_UNSHARE"
    unset PG_VIRTUALENV_UNSHARE
    exec unshare $_PG_VIRTUALENV_UNSHARE -- $0 "$@"
fi
if [ "$_PG_VIRTUALENV_UNSHARE" ]; then
    unset _PG_VIRTUALENV_UNSHARE
    # start localhost interface
    if [ -x /bin/ip ]; then
        ip link set dev lo up || true
    else
        ifconfig lo up || true
    fi
fi

disable_fakeroot ()
{
    case ${LD_PRELOAD:-} in
        *fakeroot*) LD_PRELOAD=$(echo "$LD_PRELOAD" | sed -e 's/[^ ]*fakeroot[^ ]*//g') ;;
    esac
}

help ()
{
    echo "pg_virtualenv: Create throw-away PostgreSQL environment for regression tests"
    echo "Syntax: $0 [options] [command]"
    echo "    -a                use all installed server versions"
    echo "    -v 'version ...'  list of PostgreSQL versions to run [default: latest]"
    echo "    -c 'options'      extra options to pass to pg_createcluster"
    echo "    -i 'initdb opts'  extra initdb options to pass to pg_createcluster"
    echo "    -o 'guc=value'    postgresql.conf options to pass to pg_createcluster"
    echo "    -p 'package'      set options to find extension files in debian/package/"
    echo "    -s                open a shell when command fails"
    echo "    -t                use a temporary cluster directory even as root"
    exit ${1:-0}
}

# option parsing
PGBINROOT="/usr/lib/postgresql/"
#redhat# PGBINROOT="/usr/pgsql-"
PG_VERSIONS=""
PGCONF_OPTS=()
while getopts "ac:i:ho:p:stv:" opt ; do
    case $opt in
	a) for d in $PGBINROOT*/bin/pg_ctl; do
		# prepend version so latest ends up first (i.e. on port 5432)
                dir=${d%%/bin/pg_ctl}
		PG_VERSIONS="${dir#$PGBINROOT} ${PG_VERSIONS:-}"
	   done ;;
	c) CREATE_OPTS="$OPTARG" ;;
	i) INITDB_OPTS="$OPTARG" ;;
	h) help ;;
	o) PGCONF_OPTS+=("--pgoption" "$OPTARG") ;;
        p) PACKAGE="$OPTARG" ;;
	s) run_shell=1 ;;
        t) NONROOT=1 ;;
	v) PG_VERSIONS="$OPTARG" ;;
	*) help 1 ;;
    esac
done
if [ -z "$PG_VERSIONS" ]; then
    # use latest version
    d=$(ls -v $PGBINROOT*/bin/pg_ctl 2> /dev/null | tail -1)
    if [ -z "$d" ]; then
        echo "Could not determine PostgreSQL version, are any PostgreSQL server packages installed?" >&2
        exit 2
    fi
    dir=${d%%/bin/pg_ctl}
    PG_VERSIONS="${dir#$PGBINROOT}"
fi
# shift away args
shift $(($OPTIND 