From 3b2c90d3d1c5cd0ba09d1379d791f6ec7ac07c3d Mon Sep 17 00:00:00 2001 From: Dave Dykstra <2129743+DrDaveD@users.noreply.github.com> Date: Fri, 24 May 2019 10:38:24 -0500 Subject: [PATCH] skip install parts that require root when non-root --- util/install_helper.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/util/install_helper.sh b/util/install_helper.sh index 688b2450..061b16b0 100755 --- a/util/install_helper.sh +++ b/util/install_helper.sh @@ -22,16 +22,17 @@ else DESTDIR="${DESTDIR%/}" fi -chown root:root "${DESTDIR}${bindir}/fusermount3" -chmod u+s "${DESTDIR}${bindir}/fusermount3" - install -D -m 644 "${MESON_SOURCE_ROOT}/util/fuse.conf" \ "${DESTDIR}${sysconfdir}/fuse.conf" +if [ `id -u` = 0 ]; then + chown root:root "${DESTDIR}${bindir}/fusermount3" + chmod u+s "${DESTDIR}${bindir}/fusermount3" -if test ! -e "${DESTDIR}/dev/fuse"; then - mkdir -p "${DESTDIR}/dev" - mknod "${DESTDIR}/dev/fuse" -m 0666 c 10 229 + if test ! -e "${DESTDIR}/dev/fuse"; then + mkdir -p "${DESTDIR}/dev" + mknod "${DESTDIR}/dev/fuse" -m 0666 c 10 229 + fi fi install -D -m 644 "${MESON_SOURCE_ROOT}/util/udev.rules" \