This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
plug-sdk/scripts/generate_grpc_files.sh
2024-02-20 10:45:36 +01:00

20 lines
477 B
Bash

#!/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"