common link to entry point
All checks were successful
/ job (push) Successful in 4m0s

This commit is contained in:
Marc Beninca 2025-06-28 03:01:52 +02:00
parent 9e785b7ce1
commit 1cad82456e
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F
3 changed files with 13 additions and 2 deletions

View file

@ -92,7 +92,7 @@ rwx_self_init() {
_rwx_cmd_rwx_install() { rwx_self_install "${@}"; }
rwx_self_install() {
local target="${1}"
local command file root
local command file name root
# code
if [ -n "${target}" ]; then
root="${target}${RWX_ROOT_SYSTEM}"
@ -101,10 +101,14 @@ rwx_self_install() {
fi
# commands
root="${target}/usr/local/bin"
name="${RWX_SELF_NAME}.sh"
file="${root}/${name}"
rwx_remove "${file}"
rwx_link "${file}" "${RWX_MAIN_PATH}"
for command in $(rwx_self_commands); do
file="${root}/${command}"
rwx_remove "${file}"
rwx_link "${file}" "${RWX_MAIN_PATH}"
rwx_link "${file}" "${name}"
done
# sh
file="${target}/etc/profile.d/${RWX_SELF_NAME}.sh"