xbps-base-files: some changes to all triggers.
--HG-- extra : convert_revision : 2f3a39a7d1853268b84c5087cbbf5e74044c20f0
This commit is contained in:
@@ -8,9 +8,8 @@
|
||||
# $3 = pkgname
|
||||
# $4 = version
|
||||
#
|
||||
trigger="update-desktopdb"
|
||||
desktopdb_bin=./usr/bin/update-desktop-database
|
||||
desktopdb_dir=./usr/share/applications
|
||||
desktopdb_bin=usr/bin/update-desktop-database
|
||||
desktopdb_dir=usr/share/applications
|
||||
desktopdb_cache=${desktopdb_dir}/mimeinfo.cache
|
||||
|
||||
case "$1" in
|
||||
@@ -18,15 +17,14 @@ targets)
|
||||
echo "post-install post-remove"
|
||||
;;
|
||||
run)
|
||||
echo "Running $trigger trigger..."
|
||||
|
||||
case "$2" in
|
||||
post-*)
|
||||
if [ -f ${desktopdb_cache} ]; then
|
||||
rm -f ${desktopdb_cache}
|
||||
if [ "${PKGNAME}" = "desktop-file-utils" ]; then
|
||||
[ -f ${desktopdb_cache} ] && rm -f ${desktopdb_cache}
|
||||
break
|
||||
fi
|
||||
if [ -x ${desktopdb_bin} ]; then
|
||||
echo "Updating MIME database for ${desktopdb_dir}..."
|
||||
echo "Updating MIME database..."
|
||||
${desktopdb_bin} ${desktopdb_dir}
|
||||
fi
|
||||
;;
|
||||
|
||||
Reference in New Issue
Block a user