diff --git a/module.lib b/module.lib index d9adf0c..c45a97d 100644 --- a/module.lib +++ b/module.lib @@ -76,11 +76,21 @@ local FILE FILE=$(module_find $1) [ $? -ne 0 ] && echo no module $1 found && return 1 # source $FILE "$0" -[[ $BASHPID -eq $$ ]] || echo $FILE +# [[ $BASHPID -eq $$ ]] || echo $FILE source $FILE return 0 } +module_print() { +[ ! $1 ] && echo "no module specified" && return 1 +# (return 0 2>/dev/null) && echo "module_load was sourced" || echo "module_log was executed" +local FILE +FILE=$(module_find $1) +[ $? -ne 0 ] && echo no module $1 found && return 1 +cat $FILE +return 0 +} + module_loaded() { [ ! $1 ] && echo "no module specified" && return 1 local func