Use numbered paramaters in the format-string to avoid repeating the arguments, like this:

    format("[ -d %1$s/brooklyn-%2%s ] || ln -s . %1$s/brooklyn-%2$s", getInstallDir(), getVersion())