-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup_.sh
More file actions
32 lines (23 loc) · 1.12 KB
/
setup_.sh
File metadata and controls
32 lines (23 loc) · 1.12 KB
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
30
31
32
#!/bin/bash
# -- Config --
echo "Reading configuration..."
source config
# -- Run Setup --
echo "Setup in progress..."
# robot agent: configure recources
DIR=./res/
sed -i 's#\(room_def_path *= *\).*#\1"'$DIR'room_final.dat"#' ./robot_agent/bin/res/config.ini
sed -i 's#\(tags_def_path *= *\).*#\1"'$DIR'tags_final.dat"#' ./robot_agent/bin/res/config.ini
sed -i 's#\(room_def_path *= *\).*#\1"'$DIR'room_final.dat"#' ./robot_agent/res/config.ini
sed -i 's#\(tags_def_path *= *\).*#\1"'$DIR'tags_final.dat"#' ./robot_agent/res/config.ini
# robot agent: configure robot and group port
sed -i "s/\(id *= *\).*/\1$ROBOT_ID/" ./robot_agent/bin/res/config.ini
sed -i "s/\(port *= *\).*/\1$LAB_GROUP_PORT/" ./robot_agent/bin/res/config.ini
sed -i "s/\(id *= *\).*/\1$ROBOT_ID/" ./robot_agent/res/config.ini
sed -i "s/\(port *= *\).*/\1$LAB_GROUP_PORT/" ./robot_agent/res/config.ini
ssh rescue@$ROBOT_IP mkdir /home/rescue/TDDD07
ssh rescue@$ROBOT_IP mkdir /home/rescue/TDDD07/LabGroup$LAB_GROUP
echo $ROBOT_IP
# mission control: configure app
sed -i "s/\(port *= *\).*/\1$LAB_GROUP_PORT/" ./mission_control/res/config.ini
echo "Setup done!"