libinput/src/libinput-restore-selinux-context.sh
Quentin Glidic b2b5cdaf61 meson: Fix absolute libdir case in install script
If libdir is an absolute path (which means it’s outside of prefix) we
would wrongly add the prefix to it in the install script. Just pass the
correct libdir from Meson directly thanks to join_paths() magic.

Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-02-16 16:57:30 +10:00

12 lines
258 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 ${DESTDIR}${libdir}/${sofile}"
restorecon "${DESTDIR}${libdir}/${sofile}"
fi