summaryrefslogtreecommitdiffstats
path: root/build/build.sh
blob: 1b1e1eecf15b579af658e571f7558730fa8b5f7d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash

if [ -f build.sh ]; then
    cd ../ || exit 1
fi

if [ "$IS_CONTAINER" != "" ]; then
  autoreconf -ivf
  ./configure --enable-maintainer-mode
  make dist
  rm -rf autom4te.cache
else
  if [[ "$(docker images -q netdata-builder:latest 2> /dev/null)" == "" ]]; then
      docker build -t netdata-builder:latest -f build/Dockerfile .
  fi
  docker run --rm -it \
    --env IS_CONTAINER=TRUE \
    --volume "${PWD}:/project:Z" \
    --workdir "/project" \
    netdata-builder:latest \
    ./build/build.sh
fi