parent=
while
(( "
$#
" ));
do
# While there are arguments still to be shifted
case
"
$1
"
in
-b|--branch)
branch=
"
$2
"
# 参数有值的检查下参数,不然上面 shift 2 会卡住
checkargs
"
$@
"
shift
2
parent=1
shift
break
projects=(
"
$@
"
)
Usage
./run.sh -b main aa bb cc
./run.sh --branch main -p aa bb cc
./run.sh -p aa bb cc
复制代码