File: preflight-check.sh

package info (click to toggle)
postgresql-multicorn 1.4.0-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,244 kB
  • sloc: ansic: 3,324; python: 2,258; sql: 751; makefile: 259; sh: 81
file content (19 lines) | stat: -rwxr-xr-x 543 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash

PG_CONFIG=$(which pg_config)
PY_VERSION=$(python --version 2>&1 | awk '{ print substr($2,1,3)}')
PY27_VERSION=$(python2.7 --version 2>&1 | awk '{ print substr($2,1,3)}')

if [ -z "${PG_CONFIG}" ]; then
  echo "No pg_config found in your path."
  echo "Please check if you installed the PostgreSQL development packages."
  exit 1
fi

if [ ! -x "${PG_CONFIG}" ]; then
  echo "No pg_config found in your path."
  echo "Please check if you installed the PostgreSQL development packages."
  exit 1
fi

echo "Using python $PY_VERSION."