diff --git a/sh/fs.sh b/sh/fs.sh index 0db5696..26b11c7 100644 --- a/sh/fs.sh +++ b/sh/fs.sh @@ -1,3 +1,7 @@ +# ╭────╮ +# │ fs │ +# ╰────╯ + rwx_fs_make_btrfs() { local device="${1}" local label="${2}" diff --git a/sh/main.sh b/sh/main.sh index 802418f..40fbf17 100755 --- a/sh/main.sh +++ b/sh/main.sh @@ -84,12 +84,14 @@ rwx_find_shell() { # │ main │ ifs │ # ╰──────┴─────╯ +# set internal field separator to line feed rwx_ifs_set() { _RWX_IFS="${IFS}" IFS=" " } +# unset internal field separator rwx_ifs_unset() { IFS="${_RWX_IFS}" unset RWX_IFS @@ -99,6 +101,7 @@ rwx_ifs_unset() { # │ main │ source │ # ╰──────┴────────╯ +# source code from file path rwx_source() { local path="${1}" [ -d "${path}" ] || diff --git a/sh/self.sh b/sh/self.sh index 732e9c2..0a8f33e 100644 --- a/sh/self.sh +++ b/sh/self.sh @@ -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"