I'd like to launch a script that sets and/or updates some environment variables. Unlike this question, I don't mind launching the script as
. /path/to/my/script/myScript.sh
to force the script to run the same process as the parent, however I don't want the script to silently fail if the parent forgets. id' like to detect the problem and generate an error message.
So, what's the best way to tell if the script has been executed inside it's parent's process?