# shellcheck shell=bash
# Make sure this script and the requested script name are sourced

# $BASH_SOURCE is an array, the element at 1 is the script that sourced this one
script_name="${BASH_SOURCE[1]##*/}"

# $0 is the name of the script being executed (or the shell if it's a source operation)
exec_name="${0##*/}"
if [[ $script_name = "$exec_name" ]]; then
    echo "Don't run me, source me" >&2
    exit 1
fi
