switch from 'which' to 'type' in build.sh