blob: 3a67d1d9e3232e58773a223ab8842b9b4a14c140 [file] [log] [blame]
Lott, Christopher (cl778h)6f1e4a52020-02-07 13:38:19 -05001#!/bin/sh
2##############################################################################
3#
4# Copyright (c) 2020 AT&T Intellectual Property.
5#
6# Licensed under the Apache License, Version 2.0 (the "License");
7# you may not use this file except in compliance with the License.
8# You may obtain a copy of the License at
9#
10# http://www.apache.org/licenses/LICENSE-2.0
11#
12# Unless required by applicable law or agreed to in writing, software
13# distributed under the License is distributed on an "AS IS" BASIS,
14# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15# See the License for the specific language governing permissions and
16# limitations under the License.
17#
18##############################################################################
19
20# Installs NNG then runs a build script in the repository
21# Assumes ubuntu - uses apt-get
22
23echo "--> prescan-e2mgr-ubuntu.sh"
24
25set -ex
26
27sudo apt-get update && sudo apt-get install -y cmake ninja-build
28
29# NNG repo is not frequently tagged so it's pinned to a commit hash.
30# This commit repairs bug https://github.com/nanomsg/nng/issues/970
31git clone https://github.com/nanomsg/nng.git
32(cd nng \
33 && git checkout e618abf8f3db2a94269a79c8901a51148d48fcc2 \
34 && mkdir build \
35 && cd build \
36 && cmake -DBUILD_SHARED_LIBS=1 -G Ninja .. \
37 && ninja \
38 && sudo ninja install)
39
40# build script must start in this subdir
41cd E2Manager
42bash ./build-e2mgr-ubuntu.sh
43
44echo "--> prescan-e2mgr-ubuntu.sh ends"