install.sh: Set CAP_SYS_ADMIN if neither systemd nor elogind is found

This commit is contained in:
Scott Moreau 2020-03-23 21:52:52 -06:00
parent 599b16834d
commit 06f8a6d2ea

View File

@ -121,6 +121,10 @@ PKG_CONFIG_PATH=$PKG_CONFIG_PATH:${PREFIX}/${DEST_LIBDIR}/pkgconfig meson build
ninja -C build
$SUDO ninja -C build install
if ! pkg-config --exists libsystemd && ! pkg-config --exists libelogind && pkg-config --exists libcap; then
$SUDO setcap cap_sys_admin=eip "$PREFIX/bin/wayfire"
fi
# Install a minimalistic, but still usable configuration
# First argument is the name of the file
# Second argument is the name of the template