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>
This commit is contained in:
Peter Hutterer 2017-06-23 09:35:27 +10:00
parent 8728b5b38f
commit ec27aa3a78

View file

@ -6,5 +6,7 @@
libdir="$1"
sofile=$(basename "$2")
echo "Restoring SELinux context on $MESON_INSTALL_DESTDIR_PREFIX/$libdir/$sofile"
restorecon "$MESON_INSTALL_DESTDIR_PREFIX/$libdir/$sofile"
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