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.
mkdir results
fi
-dropdb utf8
-createdb -T template0 -l C -E UTF8 utf8
+dropdb --if-exists utf8
+createdb -T template0 -l C -E UTF8 utf8 || exit 1
PSQL="psql -n -e -q"
tests="euc_jp sjis euc_kr euc_cn euc_tw big5 utf8 mule_internal"
+EXITCODE=0
+
unset PGCLIENTENCODING
for i in $tests
do
echo "----------------------"; \
echo "" ) >> regression.diffs
echo failed
+ EXITCODE=1
else
echo ok
fi
done
+
+exit $EXITCODE