mirror of
https://github.com/octoleo/telegram-bot-bash.git
synced 2025-01-15 18:36:48 +00:00
fix: use REALME as SCRIPT if sourced
This commit is contained in:
parent
69b1871eea
commit
c63f098fb0
@ -30,7 +30,7 @@ BOTCOMMANDS="-h help init start stop status suspendback resumeback killb
|
|||||||
# 8 - curl/wget missing
|
# 8 - curl/wget missing
|
||||||
# 10 - not bash!
|
# 10 - not bash!
|
||||||
#
|
#
|
||||||
#### $$VERSION$$ v1.51-dev-16-g4c4ba0b
|
#### $$VERSION$$ v1.51-dev-23-g69b1871
|
||||||
##################################################################
|
##################################################################
|
||||||
|
|
||||||
# are we running in a terminal?
|
# are we running in a terminal?
|
||||||
@ -181,6 +181,7 @@ MODULEDIR="${SCRIPTDIR}/modules"
|
|||||||
exit_source() { exit "$1"; }
|
exit_source() { exit "$1"; }
|
||||||
if [[ "${SCRIPT}" != "${REALME}" || "$1" == "source" ]]; then
|
if [[ "${SCRIPT}" != "${REALME}" || "$1" == "source" ]]; then
|
||||||
SOURCE="yes"
|
SOURCE="yes"
|
||||||
|
SCRIPT="${REALME}"
|
||||||
[ -z "$1" ] && exit_source() { printf "Exit from source ...\n"; return "$1"; }
|
[ -z "$1" ] && exit_source() { printf "Exit from source ...\n"; return "$1"; }
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user