#!/bin/sh
#
. db/conf
tests=0

_EXIT ()
{
	pgstop
	message "Updated expected output of $tests tests"
}
pgstart || exit 1
trap _EXIT EXIT

for t in sql/*
do	
	test -d "$t" && continue
	bn="$(basename "$t")"
	psql -E <"$t" | cat >"expected/$bn" || exit
	message "Updated $bn"
	tests=$(($tests + 1))
done

