From c63f098fb00f7b06c97631ca660f288cb5299eda Mon Sep 17 00:00:00 2001 From: "Kay Marquardt (Gnadelwartz)" Date: Thu, 3 Jun 2021 13:00:37 +0200 Subject: [PATCH] fix: use REALME as SCRIPT if sourced --- bashbot.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bashbot.sh b/bashbot.sh index 99f2fff..d360f54 100755 --- a/bashbot.sh +++ b/bashbot.sh @@ -30,7 +30,7 @@ BOTCOMMANDS="-h help init start stop status suspendback resumeback killb # 8 - curl/wget missing # 10 - not bash! # -#### $$VERSION$$ v1.51-dev-16-g4c4ba0b +#### $$VERSION$$ v1.51-dev-23-g69b1871 ################################################################## # are we running in a terminal? @@ -181,6 +181,7 @@ MODULEDIR="${SCRIPTDIR}/modules" exit_source() { exit "$1"; } if [[ "${SCRIPT}" != "${REALME}" || "$1" == "source" ]]; then SOURCE="yes" + SCRIPT="${REALME}" [ -z "$1" ] && exit_source() { printf "Exit from source ...\n"; return "$1"; } fi