Skip to content

Commit

Permalink
sed on macos
Browse files Browse the repository at this point in the history
  • Loading branch information
mcfedr committed May 31, 2022
1 parent ee62fc3 commit 455111c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/twirp/__mocks__/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@ PROTOC_GEN_PROTOBUF_TS_BIN="../../../node_modules/.bin/protoc-gen-ts"

OUT_DIR="./"

ifeq ($(shell uname),Darwin)
SP=" "
endif

all: replace

clean:
find "$(OUT_DIR)" -name '*.ts' -delete
find $(OUT_DIR) -name '*.ts' -delete

protobuf-ts: clean
protoc \
Expand All @@ -22,4 +26,4 @@ protobuf-ts: clean
./service.proto

replace: protobuf-ts
find "$(OUT_DIR)" -name '*.ts' -exec sed -i '' 's/from "twirp-ts"/from "..\/index"/g' {} +
find $(OUT_DIR) -name '*.ts' -exec sed -i$(SP)'' 's/from "twirp-ts"/from "..\/index"/g' {} +

0 comments on commit 455111c

Please sign in to comment.