From 86a5aacc53693b8048bc974d9413a2b5119ce30f Mon Sep 17 00:00:00 2001 From: Wesley Maa Date: Mon, 25 Nov 2024 12:48:15 -0800 Subject: [PATCH] make work for linux --- pykos/Makefile | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/pykos/Makefile b/pykos/Makefile index d5c35f9..de2fe3a 100644 --- a/pykos/Makefile +++ b/pykos/Makefile @@ -40,8 +40,16 @@ generate-proto: touch kos_protos/__init__.py # Fix imports in all generated files - find kos_protos -type f -name "*.py" -exec sed -i '' 's/from kos/from kos_protos/g' {} + - find kos_protos -type f -name "*.py" -exec sed -i '' 's/import kos/import kos_protos/g' {} + + case "$$(uname)" in \ + Darwin) \ + find kos_protos -type f -name "*.py" -exec sed -i '' 's/from kos/from kos_protos/g' {} + && \ + find kos_protos -type f -name "*.py" -exec sed -i '' 's/import kos/import kos_protos/g' {} + \ + ;; \ + *) \ + find kos_protos -type f -name "*.py" -exec sed -i 's/from kos/from kos_protos/g' {} + && \ + find kos_protos -type f -name "*.py" -exec sed -i 's/import kos/import kos_protos/g' {} + \ + ;; \ + esac .PHONY: generate-proto