Lott, Christopher (cl778h) | e5e2a4e | 2020-03-16 10:02:28 -0400 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | # Installs NNG then runs a build script in the repository |
| 3 | # Assumes ubuntu - uses apt-get |
| 4 | |
| 5 | echo "--> prescan-alarm-go-ubuntu.sh" |
| 6 | |
| 7 | set -ex |
| 8 | |
| 9 | sudo apt-get install -y cmake ninja-build |
| 10 | |
| 11 | # NNG repo is not frequently tagged so it's pinned to a commit hash. |
| 12 | # This commit repairs bug https://github.com/nanomsg/nng/issues/970 |
| 13 | git clone https://github.com/nanomsg/nng.git |
| 14 | (cd nng \ |
| 15 | && git checkout e618abf8f3db2a94269a79c8901a51148d48fcc2 \ |
| 16 | && mkdir build \ |
| 17 | && cd build \ |
| 18 | && cmake -DBUILD_SHARED_LIBS=1 -G Ninja .. \ |
| 19 | && ninja \ |
| 20 | && sudo ninja install) |
| 21 | |
| 22 | # build script must start in this subdir |
| 23 | cd adapter |
| 24 | bash build_adapter_ubuntu.sh |
| 25 | |
| 26 | echo "--> prescan-alarm-go-ubuntu.sh ends" |