This repository has been archived by the owner on Jan 13, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbootstrap.sh
executable file
·77 lines (61 loc) · 2.26 KB
/
bootstrap.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#!/bin/bash
# Exit on error
set -e
# Print each command before executing it
set -o xtrace
export LC_ALL=en_US.UTF-8
OPENBENCHMARK_DIR="$( cd "$(dirname "$0")" ; pwd -P )"
OPENWSN_DIR=$OPENBENCHMARK_DIR/../openwsn
# FIXME private branch, change to the official repo once code is merged
TAG_COAP=develop_COAP-44
TAG_OV=OV-7
REPO_COAP=https://github.com/malishav/coap.git
REPO_OV=https://github.com/malishav/openvisualizer.git
sudo apt-get update
sudo apt -y install build-essential
sudo apt -y install git
### Below is a verbatim copy of the OpenWSN install.sh script
# until a typo in openvisualizer installation gets fixed
mkdir $OPENWSN_DIR
sudo apt-get install -y git
cd $OPENWSN_DIR
git clone https://github.com/openwsn-berkeley/openwsn-fw.git
git clone https://github.com/openwsn-berkeley/openvisualizer.git
git clone https://github.com/openwsn-berkeley/coap.git
cd $OPENWSN_DIR/openwsn-fw/
sudo apt-get install -y python-dev
# Installing Python pip
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
sudo python get-pip.py
rm get-pip.py
sudo apt-get install -y scons
cd $OPENWSN_DIR/openvisualizer/
sudo apt-get install -y python-tk
sudo pip install -r requirements.txt --ignore-installed
cd $OPENWSN_DIR/coap/
sudo pip install -r requirements.txt
sudo apt-get install -y gcc-arm-none-eabi
sudo apt-get install -y gcc-msp430
cd $OPENBENCHMARK_DIR
### End of OpenWSN install.sh script copy
wget https://openwsn.atlassian.net/wiki/download/attachments/29196302/install.sh
#bash install.sh
rm install.sh
# Update OpenWSN-CoAP with the correct commit name
cd $OPENWSN_DIR/coap
git remote add -t $TAG_COAP -f repository $REPO_COAP
git checkout $TAG_COAP
# Update OpenVisualizer with the correct commit name
cd $OPENWSN_DIR/openvisualizer
git remote add -t $TAG_OV -f repository $REPO_OV
git checkout $TAG_OV
# Install OpenBenchmark requirements; OpenBenchmark scripts do not run with sudo
pip install -r $OPENBENCHMARK_DIR/requirements.txt --user
# Compile scenario configuration
cd $OPENBENCHMARK_DIR/scenario-config
python interface.py --generate-json
ssh-keygen -t rsa -N "" -f ~/.ssh/id_rsa
echo "==================================="
echo "Please publish the following SSH key on any server where automated SSH is requested"
cat ~/.ssh/id_rsa.pub
echo "==================================="