From b02b43587dd2e6c2a074397fdecba67233cb305e Mon Sep 17 00:00:00 2001 From: Kienan Stewart Date: Fri, 22 Mar 2019 13:52:42 -0400 Subject: [PATCH] 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 --- scripts/generate-reprepro-codename | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/generate-reprepro-codename b/scripts/generate-reprepro-codename index e395e56..1ac3579 100755 --- a/scripts/generate-reprepro-codename +++ b/scripts/generate-reprepro-codename @@ -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. ***"