basepath=$(cd `dirname $0`; pwd) cd $basepath find ggrpcprotos -type f -name "*.proto"|xargs -I {} bash -xc "/usr/local/bin/protoc --go_out=plugins=grpc:ggrpcprotos/ppbs -I ggrpcprotos {} " find ggrpcprotos -type f -name "*.proto"|grep -v "models/"|awk -F "[/.]" '{print $(NF-1)}'|xargs -I @ bash -c "[ -f ggrpcs/@.go ] || echo -e \"package ggrpcs\n\ntype @ struct{}\n\" > ggrpcs/@.go"