forked from codebot/middleware_olympics
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdependencies.sh
More file actions
executable file
·42 lines (33 loc) · 795 Bytes
/
Copy pathdependencies.sh
File metadata and controls
executable file
·42 lines (33 loc) · 795 Bytes
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
#!/bin/bash
set -o errexit
if [ $# -lt 1 ]; then
echo "usage: dependencies.sh MIDDLEWARE_NAME"
echo " example: dependencies.sh zenoh"
exit
fi
MIDDLEWARE_NAME=$1
if [ $MIDDLEWARE_NAME = zenoh ]; then
echo "Setting up dependencies of the Zenoh contestants..."
mkdir -p build/zenoh
cd build/zenoh
if [ ! -f ./rustup-init ]; then
wget https://sh.rustup.rs -O ./rustup-init
chmod +x ./rustup-init
./rustup-init
rustup install nightly
fi
if [ ! -d zenoh ]; then
git clone https://github.com/eclipse-zenoh/zenoh -b rust-master
else
pushd zenoh
git pull
popd
fi
cd zenoh
cargo +nightly build --release --all-targets
cargo +nightly install cbindgen
cd zenoh-ffi
./gencbind.sh
else
echo "unknown middleware: $MIDDLEWARE_NAME"
fi