mirror of
https://github.com/miaowware/qrm2.git
synced 2025-02-03 09:44:07 -05:00
run.sh: shellcheck
This commit is contained in:
parent
abdc5ebacb
commit
67add85a7a
8
run.sh
8
run.sh
@ -17,7 +17,7 @@ fi
|
|||||||
# Argument handling
|
# Argument handling
|
||||||
_PASS_ERRORS=0
|
_PASS_ERRORS=0
|
||||||
_NO_BOTENV=0
|
_NO_BOTENV=0
|
||||||
while [ ! -z "$1" ]; do
|
while [ -n "$1" ]; do
|
||||||
case $1 in
|
case $1 in
|
||||||
--pass-errors)
|
--pass-errors)
|
||||||
_PASS_ERRORS=1
|
_PASS_ERRORS=1
|
||||||
@ -35,7 +35,7 @@ done
|
|||||||
|
|
||||||
|
|
||||||
# If $PYTHON_BIN is not defined, default to 'python3.11'
|
# If $PYTHON_BIN is not defined, default to 'python3.11'
|
||||||
if [ $_NO_BOTENV -eq 1 -a -z "$PYTHON_BIN" ]; then
|
if [ $_NO_BOTENV -eq 1 ] && [ -z "$PYTHON_BIN" ]; then
|
||||||
PYTHON_BIN='python3.11'
|
PYTHON_BIN='python3.11'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -69,9 +69,9 @@ echo "$0: Starting bot..."
|
|||||||
# The loop
|
# The loop
|
||||||
while true; do
|
while true; do
|
||||||
if [ $_NO_BOTENV -eq 1 ]; then
|
if [ $_NO_BOTENV -eq 1 ]; then
|
||||||
"$PYTHON_BIN" main.py $@
|
"$PYTHON_BIN" main.py "$@"
|
||||||
else
|
else
|
||||||
./$BOTENV/bin/python3 main.py $@
|
"./$BOTENV/bin/python3" main.py "$@"
|
||||||
fi
|
fi
|
||||||
err=$?
|
err=$?
|
||||||
_message="$0: The bot exited with [$err]"
|
_message="$0: The bot exited with [$err]"
|
||||||
|
Loading…
Reference in New Issue
Block a user