-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathws_setup.sh
executable file
·42 lines (32 loc) · 1.43 KB
/
ws_setup.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
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash
echo "###############################################################################"
echo "Workshop environment setup starting.."
echo "###############################################################################"
# Wait if apt is running.
while :
do
count=`ps -ef | grep apt.systemd.daily | grep lock_is_held | grep -v grep | wc -l`
if [ $count = 0 ]; then
break
else
echo "System update is running.. Wait until the complete"
sleep 10
fi
done
sudo apt-get update
source /opt/ros/$ROS_DISTRO/setup.sh
rosdep update
pip3 install -U awscli
pip3 install -U colcon-common-extensions colcon-ros-bundle colcon-bundle
pip3 install boto3
STACK_NAME1=deliverychallenge`echo $C9_USER|tr -d [].\\\-\\\=_/`
STACK_NAME2=deliverychallengecognito`echo $C9_USER|tr -d [].\\\-\\\=_/`
aws cloudformation deploy --template-file ./cf_templates/bootstrap.cfn.yaml --stack-name $STACK_NAME1 --capabilities CAPABILITY_NAMED_IAM
aws cloudformation deploy --template-file ./cf_templates/cognito_setting.cfn.yaml --stack-name $STACK_NAME2 --capabilities CAPABILITY_IAM
./install_utils/setup.bash
./setup_ROBOTIS_sample.sh
curl -o ./robot_ws/src/aws_game_manager/certs/AmazonRootCA1.pem https://www.amazontrust.com/repository/AmazonRootCA1.pem
python3 ./ws_setup.py $STACK_NAME1 $STACK_NAME2
if [ -f ~/environment/roboMakerSettings.json ]; then
cp ./roboMakerSettings.json ~/environment/roboMakerSettings.json
fi