#!/bin/sh

set -e

trap "rm -rf /tmp/pg-repack-tablespace" EXIT
mkdir /tmp/pg-repack-tablespace
if [ "$(id -u)" = "0" ]; then
	chown postgres:postgres /tmp/pg-repack-tablespace
fi

LC_ALL=C.UTF-8 pg_buildext -i'--auth=trust' installcheck . regress
