提交 48fb49e3 编写于 作者: R Robert Haas

Minor improvements to mbregress.sh script.

1. Use new dropdb --if-exists option, to avoid alarming the user if
   the database being dropped doesn't already exist.
2. Bail out if createdb fails.
3. exit 1 if the checks fail.
4. Make it executable.

Josh Kupershmidt, with some kibitzing by me.
上级 4232c4b4
...@@ -14,11 +14,13 @@ if [ ! -d results ];then ...@@ -14,11 +14,13 @@ if [ ! -d results ];then
mkdir results mkdir results
fi fi
dropdb utf8 dropdb --if-exists utf8
createdb -T template0 -l C -E UTF8 utf8 createdb -T template0 -l C -E UTF8 utf8 || exit 1
PSQL="psql -n -e -q" PSQL="psql -n -e -q"
tests="euc_jp sjis euc_kr euc_cn euc_tw big5 utf8 mule_internal" tests="euc_jp sjis euc_kr euc_cn euc_tw big5 utf8 mule_internal"
EXITCODE=0
unset PGCLIENTENCODING unset PGCLIENTENCODING
for i in $tests for i in $tests
do do
...@@ -54,7 +56,10 @@ do ...@@ -54,7 +56,10 @@ do
echo "----------------------"; \ echo "----------------------"; \
echo "" ) >> regression.diffs echo "" ) >> regression.diffs
echo failed echo failed
EXITCODE=1
else else
echo ok echo ok
fi fi
done done
exit $EXITCODE
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册