Check that script is being sourced
I have a script that must be sourced. Is there some way
to check that the script is being executed in this fashion and throw an error if not? |
assimilate() { source "$1" 2>/dev/null || echo "in ${FUNCNAME}(): \"$1\" not ${FUNCNAME}d "; }
]$ assimilate microsoft in assimilate(): "microsoft" not assimilated |
All times are GMT -5. The time now is 05:26 AM. |