summaryrefslogtreecommitdiffstats
path: root/packaging/makeself/build.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2022-04-14 18:12:10 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2022-04-14 18:12:10 +0000
commitb5321aff06d6ea8d730d62aec2ffd8e9271c1ffc (patch)
tree36c41e35994786456154f9d3bf88c324763aeea4 /packaging/makeself/build.sh
parentAdding upstream version 1.33.1. (diff)
downloadnetdata-b5321aff06d6ea8d730d62aec2ffd8e9271c1ffc.tar.xz
netdata-b5321aff06d6ea8d730d62aec2ffd8e9271c1ffc.zip
Adding upstream version 1.34.0.upstream/1.34.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'packaging/makeself/build.sh')
-rwxr-xr-xpackaging/makeself/build.sh19
1 files changed, 9 insertions, 10 deletions
diff --git a/packaging/makeself/build.sh b/packaging/makeself/build.sh
index 4eb2c9f41..3ac600ed4 100755
--- a/packaging/makeself/build.sh
+++ b/packaging/makeself/build.sh
@@ -27,16 +27,11 @@ done
# the required packages. build-x86_64-static.sh will do this for you
# using docker.
-cd "$(dirname "$0")" || exit 1
-
-# if we don't run inside the netdata repo
-# download it and run from it
-if [ ! -f ../../netdata-installer.sh ]; then
- git clone https://github.com/netdata/netdata.git netdata.git || exit 1
- cd netdata.git/makeself || exit 1
- ./build.sh "$@"
- exit $?
-fi
+mkdir -p /usr/src
+cp -va /netdata /usr/src/netdata
+chown -R root:root /usr/src/netdata
+
+cd /usr/src/netdata/packaging/makeself || exit 1
git clean -dxf
git submodule foreach --recursive git clean -dxf
@@ -64,3 +59,7 @@ if ! ./run-all-jobs.sh "$@"; then
printf >&2 "Build failed."
exit 1
fi
+
+mkdir -p /netdata/artifacts
+cp -va /usr/src/netdata/artifacts/* /netdata/artifacts/
+chown -R "$(stat -c '%u:%g' /netdata)" /netdata/artifacts/