fix wrong json.sh location if included from other location

This commit is contained in:
Kay Marquardt (Gnadelwartz) 2020-06-04 16:14:16 +02:00
parent ff5fb2d337
commit 9c96e3eb80

View File

@ -749,7 +749,7 @@ if ! _is_function send_message ; then
exit 1
fi
JSONSHFILE="${BASHBOT_JSONSH:-${RUNDIR}/JSON.sh/JSON.sh}"
JSONSHFILE="${BASHBOT_JSONSH:-${SCRIPTDIR}/JSON.sh/JSON.sh}"
[[ "${JSONSHFILE}" != *"/JSON.sh" ]] && echo -e "${RED}ERROR: \"${JSONSHFILE}\" ends not with \"JSONS.sh\".${NC}" && exit 3
if [ ! -f "${JSONSHFILE}" ]; then