Improve scripts for multiple device building