You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
642 B
30 lines
642 B
#!/usr/bin/env bash
|
|
|
|
source ./proto_dir.cfg
|
|
|
|
for ((i = 0; i < ${#all_proto[*]}; i++)); do
|
|
proto=${all_proto[$i]}
|
|
protoc -I ../../../ -I ./ --go_out=plugins=grpc:. $proto
|
|
echo "protoc --go_out=plugins=grpc:." $proto
|
|
done
|
|
echo "proto file generate success"
|
|
|
|
|
|
j=0
|
|
for file in $(find ./Open_IM -name "*.go"); do # Not recommended, will break on whitespace
|
|
filelist[j]=$file
|
|
j=`expr $j + 1`
|
|
done
|
|
|
|
|
|
for ((i = 0; i < ${#filelist[*]}; i++)); do
|
|
proto=${filelist[$i]}
|
|
cp $proto ${proto#*./Open_IM/pkg/proto/}
|
|
done
|
|
rm Open_IM -rf
|
|
#find ./ -type f -path "*.pb.go"|xargs sed -i 's/\".\/sdkws\"/\"Open_IM\/pkg\/proto\/sdkws\"/g'
|
|
|
|
|
|
|
|
|