self/install

This commit is contained in:
Marc Beninca 2024-12-01 19:06:44 +01:00
parent f06d1e2bce
commit 52a43b0e60
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

View file

@ -20,10 +20,10 @@ rwx_self_install() {
local file
# sh
file="${target}/etc/profile.d/${RWX_SELF_NAME}.sh"
rm --force --recursive "${file}"
echo "export ENV=\"${RWX_MAIN_PATH}\"" >"${file}"
rwx_remove "${file}"
rwx_file_write "${file}" "export ENV=\"${RWX_MAIN_PATH}\""
# bash
file="/etc/bash.bashrc"
rm --force --recursive "${file}"
ln --symbolic "${RWX_MAIN_PATH}" "${file}"
rwx_remove "${file}"
rwx_link "${file}" "${RWX_MAIN_PATH}"
}