forked from RoboJackets/robocup-software
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathruncomp.sh
executable file
·29 lines (23 loc) · 971 Bytes
/
runcomp.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/bash
if ! command -v git >/dev/null; then
echo "Git is not installed!!!" >&2
exit 1
fi
if [ "$(git rev-parse --abbrev-ref HEAD)" = "HEAD" ]; then
echo "HEAD IS DETACHED AT COMMIT: $(git rev-parse HEAD)"
elif ! git rev-parse --abbrev-ref HEAD | grep -q comp; then
echo "YOUR BRANCH DOES NOT CONTAIN COMP. PLEASE RECONSIDER OR COMMENT ME OUT." >&2
exit 1
else
echo "Branch is: $(git rev-parse --abbrev-ref HEAD)"
fi
read -p "Defend Plus X (plus or minus): " defendPlusX
read -p "Vision Channel (1,2 or Full): " visionChannel
read -p "Specify Playbook file (default comp.pbk): " playbook
read -p "Specify Config File (default realComp.xml): " config
make all-release
until ./run/soccer -c "soccer/config/${config:-"realComp.xml"}" -pbk "${playbook:-"comp.pbk"}" -defend "${defendPlusX:-"minus"}" -vision "${visionChannel:-"full"}"; do
echo "Soccer crashed with exit code $?. Restarting" >&2
sleep 1
done
echo "Soccer exited normally."