style: gen.sh

This commit is contained in:
Nex Zhu 2021-07-15 14:41:32 +08:00
parent a0aa79ba13
commit 6b2c291f27
No known key found for this signature in database
GPG Key ID: 15C6254AD19362B4

View File

@ -1,7 +1,10 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# check pb dir # check pb dir
pb_dir="$(cd "$(dirname $0)";pwd)/../pb" pb_dir="$(
cd "$(dirname $0)"
pwd
)/../pb"
if [ ! -d $pb_dir ]; then if [ ! -d $pb_dir ]; then
echo "pb dir $pb_dir does not exist in grpc folder" echo "pb dir $pb_dir does not exist in grpc folder"
exit exit
@ -22,8 +25,7 @@ cmd=protoc
async_tag="" async_tag=""
# check all arguments # check all arguments
for aug in $@ for aug in $@; do
do
if [ $aug == "-a" ]; then if [ $aug == "-a" ]; then
async_tag="&" async_tag="&"
fi fi