WIP: improve build script