shutils/metadata.sh: add update-desktopdb trigger automatically.

If a package contains any .desktop file in /usr/share/applications
the trigger will be added automagically.

--HG--
extra : convert_revision : 2327dc43c9a0997814d35fab22e3cb950fc0e09a
This commit is contained in:
Juan RP 2009-05-14 19:16:17 +02:00
parent 41ae84507f
commit a8a9a42977
1 changed files with 8 additions and 0 deletions

View File

@ -342,6 +342,14 @@ _EOF
$XBPS_REGPKGDB_CMD sanitize-plist $metadir/props.plist
chmod 644 $metadir/*
# Update shared-mime-info database if package contains
# any desktop file in /usr/share/applications.
if [ -d ${DESTDIR}/usr/share/applications ]; then
if find . -type f -name \*.desktop 2>&1 >/dev/null; then
triggers="$triggers update-desktopdb"
fi
fi
#
# Create the INSTALL/REMOVE scripts if package uses them
# or uses any available trigger.