Skip to content

Commit 0a24c49

Browse files
committed
chore: fix Makefile goal gnu-sed to handle brew, port, and GNU sed on macOS gracefully
Signed-off-by: Jens Troeger <jens.troeger@light-speed.de>
1 parent 718c085 commit 0a24c49

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

Makefile

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,16 @@ souffle:
174174
.PHONY: gnu-sed
175175
gnu-sed:
176176
if [ "$(OS_DISTRO)" == "Darwin" ]; then \
177-
brew install gnu-sed; \
178-
fi
177+
if ! command -v gsed; then \
178+
if command -v brew; then \
179+
brew install gnu-sed; \
180+
elif command -v port; then \
181+
sudo port install gsed; \
182+
else \
183+
echo "Unable to install GNU sed on macOS. Please install it manually." && exit 1; \
184+
fi; \
185+
fi; \
186+
fi;
179187

180188
# Install or upgrade an existing virtual environment based on the
181189
# package dependencies declared in pyproject.toml.

0 commit comments

Comments
 (0)