Use internal make file function to empty an file.
All checks were successful
Run test asserts / Test-Asserts (push) Successful in 7s

This commit is contained in:
Willem Cazander 2024-07-16 17:20:47 +02:00
parent fbdbdd5b28
commit 729023d32b
2 changed files with 10 additions and 4 deletions

View file

@ -42,10 +42,16 @@ endif
endif
define mb-os-file-create
$(MB_   )echo "" > $(1)
define mb-os-file-empty
$(MB_   )$(file >$(1))
endef
$(call mb-make-call,mb-doc-function,mb-os-file-create,"Creates an empty file.","<file>")
$(call mb-make-call,mb-doc-function,mb-os-file-empty,"Makes an file empty.","<file>")
define mb-os-file-append
$(MB_   )$(file >>$(1),$(2))
endef
$(call mb-make-call,mb-doc-function,mb-os-file-append,"Appends text to an file","<file> <text>")
define mb-os-file-copy

View file

@ -156,7 +156,7 @@ endef
define mb-autoexec-write-default
$(MB_   )$(call mb-make-call,mb-os-echo-remark,$(MB_I18N_AUTOEXEC_WRITE) $@)
$(MB_   )@echo -n "" > $(1)/autoexec.bat
$(MB_   )$(call mb-make-call,mb-os-file-empty,$(1)/autoexec.bat)
$(MB_   )$(if $(wildcard $(1)/utils),$(call mb-make-call,_mb-autoexec-write-preboot,$(1),utils\,$(2),$(3)),$(call mb-make-call,_mb-autoexec-write-preboot,$(1),,$(2),$(3)))
$(MB_   )$(if $(filter on,$(MB_AUTOEXEC_SHOW_HOST)),$(call mb-make-call,mb-autoexec-append-cmd,$(1),omsxctl boot_exec_show_host))
$(MB_   )$(if $(MB_AUTOEXEC_STARTUP_NOTE),$(call mb-make-call,mb-autoexec-append-echo,$(1),mb::note $(MB_AUTOEXEC_STARTUP_NOTE)))