Cleanup jenkins.sh

A number of cleanups to `jenkins.sh`.  See individual commits for details.