Automatically Upgrading a Sendy Instance

Sendy is a self-hosted Newsletter manager. We've got a couple instance of Sendy running, and instead of manually upgrading each when a new version comes out, we simply run the following script for each. It's based off of the instructions from Sendy's Get Updated Page.