Par sourcer j'entends:

. script.sh

ou

source script.sh

Comme ça :

if [ "$0" != "-bash" ]
then
        echo "Please execute the program like that : . init.sh or source init.sh"
        exit 1
fi