From 652ee2a82d450f642d647bca94dadf587886a00d Mon Sep 17 00:00:00 2001 From: DragonAura Date: Thu, 25 May 2023 00:23:36 +0800 Subject: [PATCH] fix: :bug: fix python error --- dependency/shell/run.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/dependency/shell/run.sh b/dependency/shell/run.sh index 3657e62..556a0b2 100644 --- a/dependency/shell/run.sh +++ b/dependency/shell/run.sh @@ -1,6 +1,7 @@ #!/usr/local python_dir=/usr/local/PlayerCode/CAPI/python/PyAPI +python_main_dir=/usr/local/PlayerCode/CAPI/python playback_dir=/usr/local/playback if [ $EXPOSED -eq 1 ]; then @@ -19,8 +20,9 @@ do do j=$((i - 1)) if [ -f "./player$i.py" ]; then - cp -f ./player$i.py $python_dir/AI.py - nice -0 python3 $python_dir/main.py -I 127.0.0.1 -P 8888 -p $j > $playback_dir/team$k-player$j.log 2>&1 & + cp -r $python_main_dir $python_main_dir$i + cp -f ./player$i.py $python_main_dir$i/PyAPI/AI.py + nice -0 python3 $python_main_dir$i/PyAPI/main.py -I 127.0.0.1 -P 8888 -p $j > $playback_dir/team$k-player$j.log 2>&1 & elif [ -f "./capi$i" ]; then nice -0 ./capi$i -I 127.0.0.1 -P 8888 -p $j > $playback_dir/team$k-player$j.log 2>&1 & else @@ -32,8 +34,9 @@ do do j=$((i - 1)) if [ -f "./player$i.py" ]; then - cp -f ./player$i.py $python_dir/AI.py - nice -0 python3 $python_dir/main.py -I 127.0.0.1 -P 8888 -p $j > $playback_dir/team$k-player$j.log 2>&1 & + cp -r $python_main_dir $python_main_dir$i + cp -f ./player$i.py $python_main_dir$i/PyAPI/AI.py + nice -0 python3 $python_main_dir$i/PyAPI/main.py -I 127.0.0.1 -P 8888 -p $j > $playback_dir/team$k-player$j.log 2>&1 & elif [ -f "./capi$i" ]; then nice -0 ./capi$i -I 127.0.0.1 -P 8888 -p $j > $playback_dir/team$k-player$j.log 2>&1 & else