Browse Source

Merge pull request #382 from xiangmy21/dev

chore: update compile.sh
tags/0.1.0
Changli Tang GitHub 2 years ago
parent
commit
bca36eea62
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 3 deletions
  1. +2
    -3
      dependency/shell/compile.sh

+ 2
- 3
dependency/shell/compile.sh View File

@@ -5,8 +5,7 @@ flag=1
bind=/usr/local/mnt bind=/usr/local/mnt
while (( $i <= 4 )) while (( $i <= 4 ))
do do
cp -f $bind/player$i.cpp ./API/src
mv ./API/src/player$i.cpp ./API/src/AI.cpp
mv -f $bind/player$i.cpp ./API/src/AI.cpp
cmake ./CMakeLists.txt && make >compile_log$i.txt 2>&1 cmake ./CMakeLists.txt && make >compile_log$i.txt 2>&1
mv ./capi $bind/capi$i # executable file mv ./capi $bind/capi$i # executable file
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
@@ -20,4 +19,4 @@ if [ $flag -eq 1 ]; then
curl $URL -X PUT -H "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" -d '{"compile_status":"compiled"}' > $bind/curl_log.txt curl $URL -X PUT -H "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" -d '{"compile_status":"compiled"}' > $bind/curl_log.txt
else else
curl $URL -X PUT -H "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" -d '{"compile_status":"failed"}' > $bind/curl_log.txt curl $URL -X PUT -H "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" -d '{"compile_status":"failed"}' > $bind/curl_log.txt
fi
fi

Loading…
Cancel
Save