translated build.cmd to bash

tested on OSX Mavericks 10.9.4