diff --git a/sh/lint/shellcheck.sh b/sh/lint/shellcheck.sh index d5708ca..ac8c700 100644 --- a/sh/lint/shellcheck.sh +++ b/sh/lint/shellcheck.sh @@ -9,6 +9,12 @@ rwx_shellcheck() { echo ". \"${path}\"" >>"${file}" done rwx_ifs_unset + rwx_shellcheck_file "${file}" + rwx_remove "${file}" +} + +rwx_shellcheck_file() { + local file="${1}" shellcheck \ --check-sourced \ --enable "all" \ @@ -16,7 +22,6 @@ rwx_shellcheck() { --external-sources \ --shell "dash" \ "${file}" - rwx_remove "${file}" } rwx_shellcheck_write() { diff --git a/sh/self.sh b/sh/self.sh index b09d46e..41a2a0c 100644 --- a/sh/self.sh +++ b/sh/self.sh @@ -77,5 +77,6 @@ $(cat "${RWX_ROOT_SYSTEM}/${file}") rwx_ifs_unset rwx_file_write "${target}" "${text}" rwx_shfmt "${target}" + rwx_shellcheck_file "${target}" fi }