Detect if the scripts are not sourced and print help.

This commit is contained in:
Doncho N. Gunchev 2024-03-14 15:05:34 +02:00
parent 5b8a75b75c
commit dc0be5c2a1
Signed by: dgunchev
GPG key ID: D30FD19F37E002A9
4 changed files with 20 additions and 0 deletions

View file

@ -1,2 +1,7 @@
if [ "${BASH_SOURCE-}" = "$0" ]; then
echo -e "You must source this script:\n\tsource $0" >&2
exit 33
fi
TIME_STYLE=long-iso
export TIME_STYLE