Commit 36adce69 authored by Markus Frosch's avatar Markus Frosch
Browse files

deb: Ensure cleanup works with read-only files

go get can create read-only files
parent ebdc3429
Pipeline #7417 passed with stage
in 26 seconds
......@@ -40,6 +40,12 @@ echo "[ Extracting source to build directory ]"
(
set -ex
cd "${BUILDDIR}/"
set -e
if [ -d "${ICINGA_BUILD_PROJECT}" ]; then
set -x
chmod -R u+w "${ICINGA_BUILD_PROJECT}"
fi
set -x
rm -rf "${ICINGA_BUILD_PROJECT}"
dpkg-source -x ./*.dsc "${ICINGA_BUILD_PROJECT}"
)
......@@ -95,6 +101,7 @@ if [ "${ICINGA_BUILD_CLEANUP:=1}" -gt 0 ]; then
echo "[ Cleanup Build Directory ]"
(
set -ex
chmod -R u+w "${BUILDDIR:?}/${ICINGA_BUILD_PROJECT}/"
rm -rf "${BUILDDIR:?}/${ICINGA_BUILD_PROJECT}/"
)
fi
......@@ -6,7 +6,12 @@ SCRIPT_HOME="$(dirname "$(readlink -f "$0")")"
. "${SCRIPT_HOME}"/functions-debian.sh
(
set -ex
set -e
if [ -d "${BUILDDIR}" ]; then
set -x
chmod -R u+w "${BUILDDIR:?}/"
fi
set -x
rm -rf "${BUILDDIR:?}/"
)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment