Browse Source

Merge pull request #591 from DragonAura/dev

hotfix: 🐛 fix python error
tags/v0.1.0
DragonAura GitHub 2 years ago
parent
commit
861e13cdbe
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 4 deletions
  1. +7
    -4
      dependency/shell/run.sh

+ 7
- 4
dependency/shell/run.sh View File

@@ -1,6 +1,7 @@
#!/usr/local #!/usr/local


python_dir=/usr/local/PlayerCode/CAPI/python/PyAPI python_dir=/usr/local/PlayerCode/CAPI/python/PyAPI
python_main_dir=/usr/local/PlayerCode/CAPI/python
playback_dir=/usr/local/playback playback_dir=/usr/local/playback


if [ $EXPOSED -eq 1 ]; then if [ $EXPOSED -eq 1 ]; then
@@ -19,8 +20,9 @@ do
do do
j=$((i - 1)) j=$((i - 1))
if [ -f "./player$i.py" ]; then 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 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 & nice -0 ./capi$i -I 127.0.0.1 -P 8888 -p $j > $playback_dir/team$k-player$j.log 2>&1 &
else else
@@ -32,8 +34,9 @@ do
do do
j=$((i - 1)) j=$((i - 1))
if [ -f "./player$i.py" ]; then 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 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 & nice -0 ./capi$i -I 127.0.0.1 -P 8888 -p $j > $playback_dir/team$k-player$j.log 2>&1 &
else else


Loading…
Cancel
Save