Compare commits

..

3 commits

Author SHA1 Message Date
222b64f109
−ifs
All checks were successful
/ job (push) Successful in 4m58s
2025-07-04 05:19:37 +02:00
0d47b0916c
−ifs 2025-07-04 05:18:15 +02:00
415a59bca7
−ifs 2025-07-04 05:10:44 +02:00
3 changed files with 6 additions and 24 deletions

View file

@ -3,12 +3,10 @@ rwx_shellcheck() {
local file module modules path local file module modules path
file="$(mktemp)" file="$(mktemp)"
modules="$(rwx_find_shell "${root}")" modules="$(rwx_find_shell "${root}")"
rwx_ifs_set printf "%s\n" "${modules}" | while IFS= read -r module; do
for module in ${modules}; do
path="${root}/${module}" path="${root}/${module}"
echo ". \"${path}\"" >>"${file}" echo ". \"${path}\"" >>"${file}"
done done
rwx_ifs_unset
rwx_shellcheck_file "${file}" rwx_shellcheck_file "${file}"
rwx_remove "${file}" rwx_remove "${file}"
} }

View file

@ -132,23 +132,6 @@ rwx_shell_interactive() {
esac esac
} }
# ╭──────┬─────╮
# │ main │ ifs │
# ╰──────┴─────╯
# set internal field separator to line feed
rwx_ifs_set() {
_RWX_IFS="${IFS}"
IFS="
"
}
# unset internal field separator
rwx_ifs_unset() {
IFS="${_RWX_IFS}"
unset RWX_IFS
}
# ╭──────┬──────╮ # ╭──────┬──────╮
# │ main │ find │ # │ main │ find │
# ╰──────┴──────╯ # ╰──────┴──────╯

View file

@ -181,13 +181,14 @@ rwx_self_write() {
local file text local file text
text="#! /usr/bin/env sh text="#! /usr/bin/env sh
" "
rwx_ifs_set local files="$(rwx_self_subset "${@}")"
for file in $(rwx_self_subset "${@}"); do while IFS= read -r file; do
text="${text} text="${text}
$(cat "${RWX_ROOT_SYSTEM}/${file}") $(cat "${RWX_ROOT_SYSTEM}/${file}")
" "
done done <<EOF
rwx_ifs_unset ${files}
EOF
rwx_file_write "${target}" "${text}" rwx_file_write "${target}" "${text}"
rwx_shfmt "${target}" rwx_shfmt "${target}"
rwx_shellcheck_file "${target}" rwx_shellcheck_file "${target}"