From 638aece08e38fd2eb63de6b345dfc014731cf366 Mon Sep 17 00:00:00 2001 From: xiangmy21 <90919434+xiangmy21@users.noreply.github.com> Date: Mon, 24 Apr 2023 00:31:56 +0800 Subject: [PATCH] Update run.sh --- dependency/shell/run.sh | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/dependency/shell/run.sh b/dependency/shell/run.sh index f2d56db..10b2b23 100644 --- a/dependency/shell/run.sh +++ b/dependency/shell/run.sh @@ -2,17 +2,16 @@ nice -10 ./Server/Server --port 8888 --studentCount 4 --trickerCount 1 --gameTimeInSecond 600 sleep 5 -for k in {1..2} +cd /usr/local/thuai6 + +for i in {1..5} 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 + j=$((i - 1)) + if [-f "./python/player$i.py"]; then + nice -0 python3 ./python/player$i.py -I 127.0.0.1 -P 8888 -p $j + elif [-f "./capi$i"]; then + nice -0 ./capi$i -I 127.0.0.1 -P 8888 -p $j + else + echo "ERROR. $i is not found." + fi done