aboutsummaryrefslogtreecommitdiff
path: root/load.sh
blob: 7e7f0afa5ab526cfab4faf21d850621ca2dfe89c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
_atrocity_init_file="${BASH_SOURCE[0]}"
if [ "$(basename -- "$_atrocity_init_file")" != "load.sh" ] || [ "${#BASH_SOURCE[@]}" -lt 2 ]; then
	echo "ERROR: Atrocity must be sourced. If you have atrocity in a sub module, use \`source \"\$(dirname -- \"\$0\")\"/atrocity/load.sh\`"
	exit 1
fi
_atrocity_base="$(dirname -- "$(readlink -f -- _atrocity_init_file)")"

source "$_atrocity_base"/logger.sh
source "$_atrocity_base"/connect.sh

atrocity_debug "Loaded atrocity from $_atrocity_base"
_atrocity_prepare