self/install

This commit is contained in:
Marc Beninca 2024-12-01 18:58:27 +01:00
parent 9b0b4ecb80
commit aec586aa2c
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F
2 changed files with 13 additions and 10 deletions

View file

@ -14,3 +14,16 @@ rwx_self_help() {
" a__… = aliases" \
" u__… = user"
}
rwx_self_install() {
local target="${1}"
local file
# sh
file="${target}/etc/profile.d/${RWX_SELF_NAME}.sh"
rm --force --recursive "${file}"
echo "export ENV=\"${RWX_MAIN_PATH}\"" >"${file}"
# bash
file="/etc/bash.bashrc"
rm --force --recursive "${file}"
ln --symbolic "${RWX_MAIN_PATH}" "${file}"
}

View file

@ -114,13 +114,3 @@ rwx_shell_prompt() {
# print
printf "%b" "${view}"
}
rwx_shell_setup() {
# shell
echo "export ENV=\"${RWX_MAIN_PATH}\"" \
>"/etc/profile.d/${RWX_SELF_NAME}.sh"
# bash
local file="/etc/bash.bashrc"
rm --force --recursive "${file}"
ln --symbolic "${RWX_MAIN_PATH}" "${file}"
}