Improved the auto-update shell script.