This commit is contained in:
Marc Beninca 2024-12-02 03:22:30 +01:00
parent 1681e1567f
commit e60e72d1da
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

View file

@ -1,17 +1,17 @@
#! /usr/bin/env sh
# ╭───────────╮
# │ constants │
# ╰───────────╯
# ╭──────┬───────────╮
# │ main │ constants │
# ╰──────┴───────────╯
RWX_MAIN_NAME="main.sh"
RWX_SELF_NAME="rwx"
RWX_SELF_COMMAND="_${RWX_SELF_NAME}_cmd_"
# ╭───────────╮
# │ variables │
# ╰───────────╯
# ╭──────┬───────────╮
# │ main │ variables │
# ╰──────┴───────────╯
RWX_SHELL="$(cat "/proc/${$}/comm")"
@ -20,9 +20,9 @@ RWX_SELF_USER="${HOME}/${RWX_SELF_NAME}"
RWX_MAIN_PATH="${RWX_ROOT_SYSTEM}/${RWX_MAIN_NAME}"
# ╭──────
# │ core
# ╰──────
# ╭──────┬───────
# │ main │ shell
# ╰──────┴───────
# test if active shell is in interactive mode
rwx_shell_interactive() {
@ -33,7 +33,7 @@ rwx_shell_interactive() {
}
# ╭──────┬─────╮
# │ core │ log │
# │ main │ log │
# ╰──────┴─────╯
__rwx_log() {
@ -47,7 +47,7 @@ __rwx_log() {
}
# ╭──────┬──────╮
# │ core │ find │
# │ main │ find │
# ╰──────┴──────╯
# find directory’s files by extension
@ -74,7 +74,7 @@ rwx_find_shell() {
}
# ╭──────┬─────╮
# │ core │ ifs │
# │ main │ ifs │
# ╰──────┴─────╯
rwx_ifs_set() {
@ -89,7 +89,7 @@ rwx_ifs_unset() {
}
# ╭──────┬────────╮
# │ core │ source │
# │ main │ source │
# ╰──────┴────────╯
rwx_source() {
@ -111,9 +111,9 @@ rwx_source() {
rwx_ifs_unset
}
# ╭──────┬──────
# │ core │ main │
# ╰──────┴──────
# ╭──────
# │ main │
# ╰──────
# run initial steps
rwx_main() {