fix init with BASHBOT_HOME

This commit is contained in:
Kay Marquardt (Gnadelwartz) 2020-06-08 16:04:45 +02:00
parent 02e776c426
commit b189191b85
2 changed files with 3 additions and 2 deletions

View File

@ -11,7 +11,7 @@
# This file is public domain in the USA and all free countries. # This file is public domain in the USA and all free countries.
# Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying) # Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying)
# #
#### $$VERSION$$ v0.96-dev3-21-g6f86036 #### $$VERSION$$ v0.96-dev3-23-g02e776c
# #
# Exit Codes: # Exit Codes:
# - 0 sucess (hopefully) # - 0 sucess (hopefully)
@ -773,6 +773,7 @@ start_bot() {
# initialize bot environment, user and permissions # initialize bot environment, user and permissions
bot_init() { bot_init() {
[ -n "${BASHBOT_HOME}" ] && cd "${BASHBOT_HOME}" || exit 1
local DEBUG="$1" local DEBUG="$1"
# upgrade from old version # upgrade from old version
local OLDTMP="${BASHBOT_VAR:-.}/tmp-bot-bash" local OLDTMP="${BASHBOT_VAR:-.}/tmp-bot-bash"

View File

@ -5,7 +5,7 @@
# If you your bot is finished you can use make-standalone.sh to create the # If you your bot is finished you can use make-standalone.sh to create the
# the old all-in-one bashbot: bashbot.sh and commands.sh only! # the old all-in-one bashbot: bashbot.sh and commands.sh only!
# #
#### $$VERSION$$ v0.96-dev3-21-g6f86036 #### $$VERSION$$ v0.96-dev3-22-g19c45c4
# magic to ensure that we're always inside the root of our application, # magic to ensure that we're always inside the root of our application,
# no matter from which directory we'll run script # no matter from which directory we'll run script