MAAsConfig/run_all.sh

12 lines
376 B
Bash
Executable File

#!/usr/bin/env bash
SCRIPT_DIR=$(dirname $(readlink -f "$0"))
MAA_PY="$SCRIPT_DIR/ArknightsMaaConfig/maa.py"
MAA_LOG_DIR="${MAA_LOG:-/var/log/maa.log}"
cd $SCRIPT_DIR
git fetch origin && git reset --hard origin/master && git pull
if [ -x "$MAA_PY" ]; then
"$MAA_PY" > "$MAA_LOG_DIR/maa_pyshell.log" 2>&1
else
python3 "$MAA_PY" > "$MAA_LOG_DIR/maa_pyshell.log" 2>&1
fi