I would use a script to do this just to be on he safe side:
#!/usr/bin/env bash
export SOME_VAR=/path/to/main/folder
source $SOME_VAR/loading/stuff.sh --quiet
loadApp1
loadApp2
loadApp3
loadApp4
Just save that in youyour $PATH, make it executable and run it instead of your function.