diff options
author | dancer <dancer> | 2006-01-06 12:20:09 +0000 |
---|---|---|
committer | dancer <dancer> | 2006-01-06 12:20:09 +0000 |
commit | 873faeed6d8c94f2168f380a06de9396eca32e2d (patch) | |
tree | 4fb08a56db75957c3b4c5e41a0866f7f5fd0b7d7 /pbuilder-buildpackage | |
parent | 85e23881d408d3dcc2ef31675fd9db6dde2816c2 (diff) | |
download | pbuilder-873faeed6d8c94f2168f380a06de9396eca32e2d.tar pbuilder-873faeed6d8c94f2168f380a06de9396eca32e2d.tar.gz |
344958
Diffstat (limited to 'pbuilder-buildpackage')
-rwxr-xr-x | pbuilder-buildpackage | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/pbuilder-buildpackage b/pbuilder-buildpackage index db9dd9f..5c1cd24 100755 --- a/pbuilder-buildpackage +++ b/pbuilder-buildpackage @@ -139,12 +139,10 @@ trap cleanbuildplace exit umountproc if [ -d "${BUILDRESULT}" ]; then - if [ -n "${BUILDRESULTUID}" ]; then - chown "${BUILDRESULTUID}:${BUILDRESULTGID}" "${BUILDPLACE}"/tmp/buildd/* - fi - if [ -n "${BUILDRESULTGID}" ]; then - chgrp "${BUILDRESULTGID}" "${BUILDPLACE}"/tmp/buildd/* - fi + 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 echo "E: BUILDRESULT=[$BUILDRESULT] is not a directory." >&2 |