os/write
Some checks failed
/ arch (push) Successful in 2m46s
/ alpine (push) Successful in 1m57s
/ fedora (push) Successful in 12m59s
/ opensuse (push) Successful in 3m36s
/ alma (push) Successful in 12m53s
/ rocky (push) Successful in 12m49s
/ ubuntu (push) Successful in 5m54s
/ debian (push) Failing after 3m25s

This commit is contained in:
Marc Beninca 2024-08-31 01:13:08 +02:00
parent 6f3c5a8143
commit 31ca2c6117
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

View file

@ -273,14 +273,14 @@ spcd_os_sed() {
} }
spcd_os_write() { spcd_os_write() {
spcd_os_write__file="${1}" local file="${1}"
spcd_os_write__text="${2}" local text="${2}"
if [ -n "${spcd_os_write__file}" ]; then if [ -n "${file}" ]; then
[ -f "${spcd_os_write__file}" ] && [ -f "${file}" ] &&
_spcd_os_cat "${spcd_os_write__file}" _spcd_os_cat "${file}"
echo "${spcd_os_write__file}" echo "${file}"
printf "%s" "${spcd_os_write__text}" >"${spcd_os_write__file}" printf "%s" "${text}" >"${file}"
_spcd_os_cat "${spcd_os_write__file}" _spcd_os_cat "${file}"
fi fi
} }