#!/bin/bash

case ".$SHELL.$BASH_VERSION." in
	.*/bash.*-*.)
		;; # bash in bash mode, ok
	*)
		echo "Your shell is not supported, sorry..."
		echo "You can still activate by prefixing this directory to your PATH."
		return 1 2>/dev/null  # if sourced
		exit 1  # if executed
		;;
esac


if ! (return 0 2>/dev/null); then
	cat <<-EOF
		This script must be sourced and not executed directly.
		Please run:
		    source ${0@Q}
		EOF
	exit 1
fi

SELF="${BASH_SOURCE[0]}"
SELF="$(realpath -ms "$SELF")"
SELF="$(dirname "$SELF")"

export PATH="$SELF:$PATH"
echo "Added to path: ${SELF@Q}"
unset SELF
