aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Sébastien Pédron <[email protected]>2025-07-07 12:53:19 +0200
committerJean-Sébastien Pédron <[email protected]>2025-07-22 17:24:42 +0200
commitac4f2f28c37b9d6213fa2ce0647a1e1c2495f7ab (patch)
tree8db60bbbf8d14ac051ab59f154cc7b3161a74044
parent75d0a61fba23a9b820c3a272acf07ab37d94482b (diff)
downloaderlang.mk-ac4f2f28c37b9d6213fa2ce0647a1e1c2495f7ab.tar.gz
erlang.mk-ac4f2f28c37b9d6213fa2ce0647a1e1c2495f7ab.tar.bz2
erlang.mk-ac4f2f28c37b9d6213fa2ce0647a1e1c2495f7ab.zip
core/elixir.mk: Do not use sed's `-i` argument
Use "sed ... > ..." + "mv ..." instead. The problem is that the `-i` argument is not part of POSIX and is implemented differently betwee GNU sed and BSD sed. The previous use was ok on Linux but failed on FreeBSD for instance.
-rw-r--r--core/elixir.mk3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/elixir.mk b/core/elixir.mk
index 7b6bdd8..ece705d 100644
--- a/core/elixir.mk
+++ b/core/elixir.mk
@@ -170,7 +170,8 @@ define dep_autopatch_mix.erl
endef
define dep_autopatch_mix
- sed 's|\(defmodule.*do\)|\1\n try do\n Code.compiler_options(on_undefined_variable: :warn)\n rescue _ -> :ok\n end\n|g' -i $(DEPS_DIR)/$(1)/mix.exs; \
+ sed 's|\(defmodule.*do\)|\1\n try do\n Code.compiler_options(on_undefined_variable: :warn)\n rescue _ -> :ok\n end\n|g' $(DEPS_DIR)/$(1)/mix.exs > $(DEPS_DIR)/$(1)/mix.exs.new; \
+ mv $(DEPS_DIR)/$(1)/mix.exs.new $(DEPS_DIR)/$(1)/mix.exs; \
$(MAKE) $(DEPS_DIR)/hex_core/ebin/dep_built; \
MIX_ENV="$(if $(MIX_ENV),$(strip $(MIX_ENV)),prod)" \
$(call erlang,$(call dep_autopatch_mix.erl,$1))