summaryrefslogtreecommitdiffstats
path: root/packaging/makeself/build.sh
diff options
context:
space:
mode:
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/