roikles/wordpress-githooks — pull request #1 by mikefrancis (2013-07-29 11:50:58+00:00)
Title: Stop script running if it fails to connect/select db

If the script fails it goes ahead and creates the duplicate database, which then causes the script to fail somewhere else when ran again. This will stop the script when it fails in the first instances, stopping anything else being done/created.