CBD-1357: Parameterize build script

Change-Id: Ibc2d4e905465ac5cd740ae18c6dd0907b1e1ae97
Reviewed-on: http://review.couchbase.org/36008
Reviewed-by: Philip Labee <philip@couchbase.com>
Tested-by: Philip Labee <philip@couchbase.com>