main/log
This commit is contained in:
parent
1bc166a046
commit
839c8fa069
1 changed files with 16 additions and 14 deletions
30
sh/main.sh
30
sh/main.sh
|
@ -12,7 +12,7 @@ SH_MAIN="${SH_ROOT}/${SH_MAIN_NAME}"
|
||||||
SH_SHELL="$(cat "/proc/${$}/comm")"
|
SH_SHELL="$(cat "/proc/${$}/comm")"
|
||||||
SH_USER="${HOME}/${SH_NAME}"
|
SH_USER="${HOME}/${SH_NAME}"
|
||||||
|
|
||||||
# functions
|
# private
|
||||||
|
|
||||||
_sh_ifs_new() {
|
_sh_ifs_new() {
|
||||||
SH_IFS="${IFS}"
|
SH_IFS="${IFS}"
|
||||||
|
@ -25,6 +25,21 @@ _sh_ifs_pop() {
|
||||||
unset SH_IFS
|
unset SH_IFS
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_sh_main_log() {
|
||||||
|
case "${-}" in
|
||||||
|
*i*)
|
||||||
|
[ ${#} -gt 0 ] || set -- ""
|
||||||
|
local line
|
||||||
|
for line in "${@}"; do
|
||||||
|
echo "${line}"
|
||||||
|
done
|
||||||
|
;;
|
||||||
|
*) ;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
|
||||||
sh_source_check() {
|
sh_source_check() {
|
||||||
local root="${1}"
|
local root="${1}"
|
||||||
local file module modules
|
local file module modules
|
||||||
|
@ -67,19 +82,6 @@ _sh_main_commands() {
|
||||||
cut --delimiter "(" --fields 1
|
cut --delimiter "(" --fields 1
|
||||||
}
|
}
|
||||||
|
|
||||||
_sh_main_log() {
|
|
||||||
case "${-}" in
|
|
||||||
*i*)
|
|
||||||
[ ${#} -gt 0 ] || set -- ""
|
|
||||||
local line
|
|
||||||
for line in "${@}"; do
|
|
||||||
echo "${line}"
|
|
||||||
done
|
|
||||||
;;
|
|
||||||
*) ;;
|
|
||||||
esac
|
|
||||||
}
|
|
||||||
|
|
||||||
main_source_directory() {
|
main_source_directory() {
|
||||||
local path="${1}"
|
local path="${1}"
|
||||||
if [ ! -d "${path}" ]; then
|
if [ ! -d "${path}" ]; then
|
||||||
|
|
Loading…
Reference in a new issue