#!/bin/bash mkdir -p "api/gRPC" plugName = "" protoc \ --proto_path=third_party/grpc-proto \ --go_out=api/gRPC \ --go_opt=paths=source_relative \ --go-grpc_out=api/gRPC \ --go-grpc_opt=paths=source_relative \ third_party/grpc-proto/*.proto dir_path="./api/gRPC" old_text="git.dragse.it/anthrove/plug-[REPLACE_ME]/api/gRPC" new_text="git.dragse.it/anthrove/plug-$plugName/api/gRPC"" grep -rlZ "$old_text" "$dir_path" | xargs -0 sed -i "s#$old_text#$new_text#g"