build script in bash

not tested