build script: make code nicer