Browse Source

Chore: change run.sh

tags/0.1.0
sendssf 2 years ago
parent
commit
b83b15c90a
2 changed files with 15 additions and 59 deletions
  1. +1
    -1
      .github/workflows/docker.yml
  2. +14
    -58
      dependency/shell/run.sh

+ 1
- 1
.github/workflows/docker.yml View File

@@ -1,7 +1,7 @@
name: "docker" name: "docker"
on: on:
push: push:
branches: [main,dev]
branches: [main]


jobs: jobs:
upload_docker_images: upload_docker_images:


+ 14
- 58
dependency/shell/run.sh View File

@@ -2,61 +2,17 @@


nice -10 ./Server/Server --port 8888 --studentCount 4 --trickerCount 1 --gameTimeInSecond 600 nice -10 ./Server/Server --port 8888 --studentCount 4 --trickerCount 1 --gameTimeInSecond 600
sleep 5 sleep 5
cd /usr/local/team1
if [-f "./capi1"];then
nice -0 ./capi1 -I 127.0.0.1 -P 8888 -p 0
fi
if [-f "./capi2"];then
nice -0 ./capi2 -I 127.0.0.1 -P 8888 -p 1
fi
if [-f "./capi3"];then
nice -0 ./capi3 -I 127.0.0.1 -P 8888 -p 2
fi
if [-f "./capi4"];then
nice -0 ./capi4 -I 127.0.0.1 -P 8888 -p 3
if [-f "./capi5"];then
nice -0 ./capi5 -I 127.0.0.1 -P 8888 -p 4
if [-f "./python/player1.py"];then
nice -0 python3 ./python/player1.py -I 127.0.0.1 -P 8888 -p 0
fi
if [-f "./python/player2.py"];then
nice -0 python3 ./python/player2.py -I 127.0.0.1 -P 8888 -p 1
fi
if [-f "./python/player3.py"];then
nice -0 python3 ./python/player3.py -I 127.0.0.1 -P 8888 -p 2
fi
if [-f "./python/player4.py"];then
nice -0 python3 ./python/player4.py -I 127.0.0.1 -P 8888 -p 3
fi
if [-f "./python/player5.py"];then
nice -0 python3 ./python/player5.py -I 127.0.0.1 -P 8888 -p 4
fi
cd /usr/local/team2
if [-f "./capi1"];then
nice -0 ./capi1 -I 127.0.0.1 -P 8888 -p 0
fi
if [-f "./capi2"];then
nice -0 ./capi2 -I 127.0.0.1 -P 8888 -p 1
fi
if [-f "./capi3"];then
nice -0 ./capi3 -I 127.0.0.1 -P 8888 -p 2
fi
if [-f "./capi4"];then
nice -0 ./capi4 -I 127.0.0.1 -P 8888 -p 3
if [-f "./capi5"];then
nice -0 ./capi5 -I 127.0.0.1 -P 8888 -p 4
if [-f "./python/player1.py"];then
nice -0 python3 ./python/player1.py -I 127.0.0.1 -P 8888 -p 0
fi
if [-f "./python/player2.py"];then
nice -0 python3 ./python/player2.py -I 127.0.0.1 -P 8888 -p 1
fi
if [-f "./python/player3.py"];then
nice -0 python3 ./python/player3.py -I 127.0.0.1 -P 8888 -p 2
fi
if [-f "./python/player4.py"];then
nice -0 python3 ./python/player4.py -I 127.0.0.1 -P 8888 -p 3
fi
if [-f "./python/player5.py"];then
nice -0 python3 ./python/player5.py -I 127.0.0.1 -P 8888 -p 4
fi
for k in {1..2}
do
pushd /usr/local/team$k
for i in {1..5}
do
if [-f "./capi$i"]; then
j=$((i - 1))
nice -0 ./capi$i -I 127.0.0.1 -P 8888 -p $j
elif [-f "./python/player$i.py"]; then
nice -0 python3 ./python/player$i.py -I 127.0.0.1 -P 8888 -p $j
fi
done
popd
done

Loading…
Cancel
Save