25 lines
449 B
Bash
Executable file
25 lines
449 B
Bash
Executable file
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
export LC_ALL=C.UTF-8
|
|
export LANG=C.UTF-8
|
|
|
|
PG_VERSIONS=$(/usr/share/postgresql-common/supported-versions)
|
|
|
|
for PG_VERSION in ${PG_VERSIONS}; do
|
|
export PATH=/usr/lib/postgresql/${PG_VERSION}/bin:$PATH
|
|
done
|
|
|
|
if [ $(id -u) -eq 0 ]
|
|
then
|
|
# required so that the postgres user can create files
|
|
chmod 777 .
|
|
chmod 777 features
|
|
SU='su postgres -p -c'
|
|
else
|
|
SU='bash -c'
|
|
fi
|
|
|
|
$SU "export PATH; behave"
|