<fix>[runMavenProfile]: change shebang into bash
`sh` in CentOS is an alias of `bash`, and `echo` behaves different
in MacOS and CentOS with the `sh` shebang. `sh` in Ubuntu is not an
alias, so the original `zprint` couldn't behave as expected.
So change shebang into bash, simplify logic of runMavenProfile.
Resolves:
-#!/bin/sh
+#!/bin/bash
usage() {
echo "usage:$0 [deploydb|deploy|xml-java-schema|premium|sdk|doc|docpremium|md|mdpremium|openapi|errorcode|check|git]"
@@ -231,8 +231,11 @@ globalconfigdocmd(){
}
zprint(){
+ # NOTE(weiw): `sh` in CentOS is an alias of `bash` actually
+ # and `echo` behaves different for `sh` in MacOS and CentOS
+ # sinec we changed shebang into bash, now it could be unify actually
if test x`uname` = x"Darwin"; then
- echo $@
+ echo -e $@
else
echo -e $@
fi
