Skip to content
Snippets Groups Projects
Commit a89f9731 authored by Bruce Momjian's avatar Bruce Momjian
Browse files

Have pg_dumpall return proper status on exit

parent e66f5c05
No related branches found
No related tags found
No related merge requests found
......@@ -52,5 +52,9 @@ do
echo "${BS}connect template1 $POSTGRES_USER"
echo "create database $DATABASE;"
echo "${BS}connect $DATABASE $POSTGRES_USER"
pg_dump "$@" $DATABASE || echo "pg_dump failed on $DATABASE" 1>&2
pg_dump "$@" $DATABASE
if [ "$?" -ne 0 ]
then echo "pg_dump failed on $DATABASE, exiting" 1>&2
exit 1
fi
done
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment