mirror of
https://github.com/postgres/postgres.git
synced 2025-06-20 15:22:23 +03:00
Have pg_dumpall return proper status on exit
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user