From 07ffb7c0d0977cebf7811ebcae7d99dc705031ee Mon Sep 17 00:00:00 2001 From: William Banfield Date: Fri, 12 Nov 2021 12:52:10 -0500 Subject: [PATCH] protocgen script cleanup --- scripts/protocgen.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/protocgen.sh b/scripts/protocgen.sh index b558c7cf7..b6d35ac66 100755 --- a/scripts/protocgen.sh +++ b/scripts/protocgen.sh @@ -24,7 +24,8 @@ cp -r ./tendermint-spec-"$REF"/proto/tendermint/* ./proto/tendermint cp -r ./tendermint-spec-"$REF"/third_party/** ./third_party MODNAME="$(go list -m)" -find ./proto/tendermint -name *.proto -not -path "./proto/tendermint/abci/types.proto" -exec sh ./scripts/protopackage.sh {} $MODNAME ';' +find ./proto/tendermint -name '*.proto' -not -path "./proto/tendermint/abci/types.proto" \ + -exec sh ./scripts/protopackage.sh {} "$MODNAME" ';' # For historical compatibility, the abci file needs to get a slightly different import name # so that it can be moved into the ./abci/types directory. @@ -38,5 +39,8 @@ echo "proto files have been compiled" echo "removing copied files" -find ./tendermint-spec-"$REF"/proto/tendermint/ -name *.proto | sed "s/\.\/tendermint-spec-$REF\/\(.*\)/\1/g" | xargs -I {} rm {} +find ./tendermint-spec-"$REF"/proto/tendermint/ -name *.proto \ + | sed "s/\.\/tendermint-spec-$REF\/\(.*\)/\1/g" \ + | xargs -I {} rm {} + rm -rf ./tendermint-spec-"$REF"