libinput/src/libinput-restore-selinux-context.sh
Peter Hutterer ec27aa3a78 Skip restorecon if it cannot be found
https://bugs.freedesktop.org/show_bug.cgi?id=101557

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-06-23 09:58:42 +10:00

12 lines
290 B
Bash

#!/bin/sh
#
# $1: abs path to libdir
# $2: abs path to .so file
libdir="$1"
sofile=$(basename "$2")
if command -v restorecon >/dev/null; then
echo "Restoring SELinux context on $MESON_INSTALL_DESTDIR_PREFIX/$libdir/$sofile"
restorecon "$MESON_INSTALL_DESTDIR_PREFIX/$libdir/$sofile"
fi