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
file="$(mktemp)"
modules="$(rwx_find_shell "${root}")"
rwx_ifs_set
for module in ${modules}; do
printf "%s\n" "${modules}" | while IFS= read -r module; do
path="${root}/${module}"
echo ". \"${path}\"" >>"${file}"
done
rwx_ifs_unset
rwx_shellcheck_file "${file}"
rwx_remove "${file}"
}

View file

@ -132,23 +132,6 @@ rwx_shell_interactive() {
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 │
# ╰──────┴──────╯

View file

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