self/install
This commit is contained in:
parent
9b0b4ecb80
commit
aec586aa2c
2 changed files with 13 additions and 10 deletions
13
sh/self.sh
13
sh/self.sh
|
@ -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}"
|
||||
}
|
||||
|
|
10
sh/shell.sh
10
sh/shell.sh
|
@ -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}"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue