MAAsConfig/run_all.sh

12 lines
376 B
Bash
Raw Permalink Normal View History

#!/usr/bin/env bash
2025-01-22 21:25:04 +08:00
2025-01-14 23:01:26 +08:00
SCRIPT_DIR=$(dirname $(readlink -f "$0"))
MAA_PY="$SCRIPT_DIR/ArknightsMaaConfig/maa.py"
2025-01-22 21:25:04 +08:00
MAA_LOG_DIR="${MAA_LOG:-/var/log/maa.log}"
2025-04-05 17:14:21 +08:00
cd $SCRIPT_DIR
git fetch origin && git reset --hard origin/master && git pull
2025-01-14 23:01:26 +08:00
if [ -x "$MAA_PY" ]; then
2025-01-22 21:35:27 +08:00
"$MAA_PY" > "$MAA_LOG_DIR/maa_pyshell.log" 2>&1
2025-01-14 23:01:26 +08:00
else
2025-01-22 21:35:27 +08:00
python3 "$MAA_PY" > "$MAA_LOG_DIR/maa_pyshell.log" 2>&1
2025-01-14 23:01:26 +08:00
fi