This is an example of bash library usage. The library fail-fast if you try to use directly from CLI.
The library contains the shebang and execution permissions only for the examples. Not needed in production code (the shebaang and the permissions).
# Execute a program that uses the library
$ ./use-foo-library
Boom!
# Source the library and call some library function
$ . foo-library.sh
$ foo
Boom!
$ bar
Bang!
# Execute the library. That print error message in STDERR and finish the
# execution with code 1
$ ./foo-library.sh
foo-library.sh is a shell library, not a script!