File: pg-build.sh

package info (click to toggle)
sqlreduce 1.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 12,172 kB
  • sloc: python: 1,026; sql: 40; sh: 22; makefile: 14
file content (34 lines) | stat: -rwxr-xr-x 600 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/sh

# Run this script in a postgresql.git checkout

set -eux

PGHOME=/usr/local/pgsql
PGDATA=$PGHOME/data
PGLOG=$PGDATA/log
PGBIN=$PGHOME/bin

# check we are in the correct directory before invoking git clean
grep 'PostgreSQL Database Management System' README

git clean -xdf
./configure --enable-cassert
make -j$(nproc)
make install

PATH=$PGBIN:$PATH

pg_ctl -D $PGDATA stop || :
rm -rf $PGDATA

initdb -D $PGDATA
cat >> $PGDATA/postgresql.conf <<EOF
port = 5430
unix_socket_directories = '/tmp'
fsync = off
EOF

pg_ctl -D $PGDATA -l $PGLOG start

PGHOST=/tmp PGPORT=5430 make installcheck