aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xpbuilder-buildpackage5
1 files changed, 3 insertions, 2 deletions
diff --git a/pbuilder-buildpackage b/pbuilder-buildpackage
index 5c1cd24..82870e0 100755
--- a/pbuilder-buildpackage
+++ b/pbuilder-buildpackage
@@ -138,10 +138,11 @@ save_aptcache
trap cleanbuildplace exit
umountproc
+BUILDRESULTUID="${BUILDRESULTUID:-${SUDO_UID:-0}}"
+BUILDRESULTGID="${BUILDRESULTGID:-${SUDO_GID:-0}}"
+
if [ -d "${BUILDRESULT}" ]; then
- BUILDRESULTUID="${BUILDRESULTUID:-${SUDO_UID:-0}}"
chown "${BUILDRESULTUID}:${BUILDRESULTGID}" "${BUILDPLACE}"/tmp/buildd/*
- BUILDRESULTGID="${BUILDRESULTGID:-${SUDO_GID:-0}}"
chgrp "${BUILDRESULTGID}" "${BUILDPLACE}"/tmp/buildd/*
cp -p "${BUILDPLACE}"/tmp/buildd/* "${BUILDRESULT}" 2>/dev/null || true
else