main/frames
This commit is contained in:
parent
b93a6909bb
commit
6eec85df21
1 changed files with 15 additions and 5 deletions
20
sh/main.sh
20
sh/main.sh
|
@ -1,4 +1,6 @@
|
||||||
# constants
|
# ╭───────────╮
|
||||||
|
# │ constants │
|
||||||
|
# ╰───────────╯
|
||||||
|
|
||||||
SH_MAIN_NAME="main.sh"
|
SH_MAIN_NAME="main.sh"
|
||||||
SH_NAME="sh"
|
SH_NAME="sh"
|
||||||
|
@ -7,12 +9,16 @@ SH_ROOT="/etc/${SH_NAME}"
|
||||||
|
|
||||||
SH_MAIN="${SH_ROOT}/${SH_MAIN_NAME}"
|
SH_MAIN="${SH_ROOT}/${SH_MAIN_NAME}"
|
||||||
|
|
||||||
# variables
|
# ╭───────────╮
|
||||||
|
# │ variables │
|
||||||
|
# ╰───────────╯
|
||||||
|
|
||||||
SH_SHELL="$(cat "/proc/${$}/comm")"
|
SH_SHELL="$(cat "/proc/${$}/comm")"
|
||||||
SH_USER="${HOME}/${SH_NAME}"
|
SH_USER="${HOME}/${SH_NAME}"
|
||||||
|
|
||||||
# private
|
# ╭─────────╮
|
||||||
|
# │ private │
|
||||||
|
# ╰─────────╯
|
||||||
|
|
||||||
_sh_ifs_new() {
|
_sh_ifs_new() {
|
||||||
SH_IFS="${IFS}"
|
SH_IFS="${IFS}"
|
||||||
|
@ -35,7 +41,9 @@ _sh_main_log() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# public
|
# ╭────────╮
|
||||||
|
# │ public │
|
||||||
|
# ╰────────╯
|
||||||
|
|
||||||
# find directory’s files by extension
|
# find directory’s files by extension
|
||||||
sh_find_extension() {
|
sh_find_extension() {
|
||||||
|
@ -109,7 +117,9 @@ sh_source_directory() {
|
||||||
_sh_ifs_pop
|
_sh_ifs_pop
|
||||||
}
|
}
|
||||||
|
|
||||||
# main
|
# ╭──────╮
|
||||||
|
# │ main │
|
||||||
|
# ╰──────╯
|
||||||
|
|
||||||
# run initial steps
|
# run initial steps
|
||||||
sh_main() {
|
sh_main() {
|
||||||
|
|
Loading…
Reference in a new issue