Move platform-specific stuff into config variables.

Reduce number of scripts. Keep config on jenkins.