Your shebang line says Bash but the symptom suggests that you are running it with sh , which doesn't have a source command. Superficially ...
stackoverflow.com