Browse Source

fix: grap json

tags/0.1.0
TCL 2 years ago
parent
commit
03715b3fa9
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      dependency/shell/run.sh

+ 2
- 2
dependency/shell/run.sh View File

@@ -63,6 +63,6 @@ else
fi fi


result=$(cat /usr/local/playback/result.json) result=$(cat /usr/local/playback/result.json)
score_0=$(echo "$result" | grep -oP '(?<="Student":)\d+')
score_1=$(echo "$result" | grep -oP '(?<="Tricker":)\d+')
score0=$(echo "$result" | grep -oP '(?<="Student":)\d+')
score1=$(echo "$result" | grep -oP '(?<="Tricker":)\d+')
curl $URL -X PUT -H "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" -d '{"result":[{"team_id":0, "score":'${score0}'}, {"team_id":1, "score":'${score1}'}], "mode":'${MODE}'}' curl $URL -X PUT -H "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" -d '{"result":[{"team_id":0, "score":'${score0}'}, {"team_id":1, "score":'${score1}'}], "mode":'${MODE}'}'

Loading…
Cancel
Save