doc
This commit is contained in:
parent
149cc47894
commit
53f8c5d91c
1 changed files with 21 additions and 0 deletions
21
sh/self.sh
21
sh/self.sh
|
@ -1,3 +1,24 @@
|
||||||
|
# meta doc
|
||||||
|
rwx_doc() {
|
||||||
|
local name="${1}"
|
||||||
|
[ -n "${name}" ] || return
|
||||||
|
local doc line module
|
||||||
|
rwx_ifs_set
|
||||||
|
for module in $(rwx_find_shell "${RWX_ROOT_SYSTEM}"); do
|
||||||
|
while read -r line; do
|
||||||
|
case "${line}" in
|
||||||
|
"#"*) doc="${doc}${line}" ;;
|
||||||
|
"${name}() {")
|
||||||
|
echo "${doc}"
|
||||||
|
return
|
||||||
|
;;
|
||||||
|
*) doc="" ;;
|
||||||
|
esac
|
||||||
|
done < "${RWX_ROOT_SYSTEM}/${module}"
|
||||||
|
done
|
||||||
|
rwx_ifs_unset
|
||||||
|
}
|
||||||
|
|
||||||
# ╭──────┬───────╮
|
# ╭──────┬───────╮
|
||||||
# │ self │ check │
|
# │ self │ check │
|
||||||
# ╰──────┴───────╯
|
# ╰──────┴───────╯
|
||||||
|
|
Loading…
Reference in a new issue