Remove usage of SUDO_CMD from generate-reprepro-codename

The script generate-reprepro-codename is already called by SUDO_CMD (so,
as the reprepro user if necessary) from build-and-provide-package.

Fixes #220
master
Kienan Stewart 8 years ago
parent 629746ae15
commit b02b43587d
No known key found for this signature in database
GPG Key ID: 075A846E78FE47EA

@ -119,12 +119,12 @@ if [ -z "${REPOSITORY:-}" ] ; then
echo "*** Repository variable REPOSITORY is unset, using default [$REPOSITORY] ***"
fi
if ! ${SUDO_CMD:-} mkdir -p "${REPOSITORY}"/conf ; then
if ! mkdir -p "${REPOSITORY}"/conf ; then
echo "Error creating ${REPOSITORY}/conf (forgot to create ${REPOSITORY} and chown jenkins?)" >&2
exit 1
fi
if ! ${SUDO_CMD:-} chown $(id -un) "${REPOSITORY}"/conf ; then
if ! chown $(id -un) "${REPOSITORY}"/conf ; then
echo "*** Warning: failed to adjust permissions of ${REPOSITORY}/conf ***"
echo "*** This might be caused by a remote FS like sshfs, so not failing the build. ***"
echo "*** Please fix the underlying problem if you depend on according permissions. ***"

Loading…
Cancel
Save