Use PROGNAME in the deployment script as well
Let more variables be overridden locally for the deployment script
Check for local changes before deploying (except when forced)
Use a temporary file remotely when deploying