Move native echo to os commands.
All checks were successful
Run test asserts / Test-Asserts (push) Successful in 0s

This commit is contained in:
Willem Cazander 2024-07-06 00:57:03 +02:00
parent 71afe8278f
commit e015f5bbb1
2 changed files with 4 additions and 2 deletions

View file

@ -85,13 +85,13 @@ MB_DOC_FIRE_FUNCTION_DEEP += $(call mb_make_call,mb_doc_function_deep,mb_make_xm
define mb_make_echo_good define mb_make_echo_good
$(if $(filter -1,$(MB_OS_COLORS)),@echo $(MB_MAKE_ECHO_CRAYON) $(1),/usr/bin/echo -e "\x1B[32m$(MB_MAKE_ECHO_CRAYON)$$1\x1B[39m $(1)") $(if $(filter -1,$(MB_OS_COLORS)),@echo $(MB_MAKE_ECHO_CRAYON) $(1),$(MB_OS_ECHO) -e "\x1B[32m$(MB_MAKE_ECHO_CRAYON)$$1\x1B[39m $(1)")
endef endef
MB_DOC_FIRE_FUNCTION_DEEP += $(call mb_make_call,mb_doc_function_deep,mb_make_echo_good,"Echo's an message to stdout with 'green' crayon.","<message>") MB_DOC_FIRE_FUNCTION_DEEP += $(call mb_make_call,mb_doc_function_deep,mb_make_echo_good,"Echo's an message to stdout with 'green' crayon.","<message>")
define mb_make_echo_fail define mb_make_echo_fail
$(if $(filter -1,$(MB_OS_COLORS)),@echo $(MB_MAKE_ECHO_CRAYON) $(1),/usr/bin/echo -e "\x1B[31m$(MB_MAKE_ECHO_CRAYON)$$1\x1B[39m $(1)") $(if $(filter -1,$(MB_OS_COLORS)),@echo $(MB_MAKE_ECHO_CRAYON) $(1),$(MB_OS_ECHO) -e "\x1B[31m$(MB_MAKE_ECHO_CRAYON)$$1\x1B[39m $(1)")
endef endef
MB_DOC_FIRE_FUNCTION_DEEP += $(call mb_make_call,mb_doc_function_deep,mb_make_echo_fail,"Echo's an message to stdout with 'red' crayon.","<message>") MB_DOC_FIRE_FUNCTION_DEEP += $(call mb_make_call,mb_doc_function_deep,mb_make_echo_fail,"Echo's an message to stdout with 'red' crayon.","<message>")

View file

@ -5,6 +5,7 @@ ifeq ($(OS),Windows_NT)
MB_OS_RMDIR = RMDIR /S /Q MB_OS_RMDIR = RMDIR /S /Q
MB_OS_MKDIR = mkdir MB_OS_MKDIR = mkdir
MB_OS_COPY = copy MB_OS_COPY = copy
MB_OS_ECHO ?= echo
MB_OS_ERRIGNORE = 2>NUL || true MB_OS_ERRIGNORE = 2>NUL || true
MB_OS_SEP = "\" MB_OS_SEP = "\"
MB_OS_CACHE ?= %LOCALAPPDATA% MB_OS_CACHE ?= %LOCALAPPDATA%
@ -14,6 +15,7 @@ else
MB_OS_RMDIR = rm -rf MB_OS_RMDIR = rm -rf
MB_OS_MKDIR = mkdir -p MB_OS_MKDIR = mkdir -p
MB_OS_COPY = cp MB_OS_COPY = cp
MB_OS_ECHO ?= /usr/bin/echo
MB_OS_ERRIGNORE = 2>/dev/null MB_OS_ERRIGNORE = 2>/dev/null
MB_OS_SEP = "/" MB_OS_SEP = "/"
MB_OS_CACHE ?= ~/.cache MB_OS_CACHE ?= ~/.cache