Generate install and upgrade scripts during build