scripts: improved build scripts