xbps-triggers: update-desktopdb: do not run it if required dir is unavailable.

This commit is contained in:
Juan RP 2013-04-07 09:15:47 +02:00
parent a99b3ebf5a
commit 7f1f3c7166
2 changed files with 3 additions and 5 deletions

View file

@ -1,4 +1,4 @@
#!/bin/sh -e
#!/bin/sh
#
# Updates the MIME database that connects with applications, through
# the update-desktop-database(1) utility.
@ -15,8 +15,6 @@ PKGNAME="$3"
VERSION="$4"
UPDATE="$5"
export PATH="$PATH:/usr/local/bin"
desktopdb_bin=usr/bin/update-desktop-database
desktopdb_dir=usr/share/applications
desktopdb_cache=${desktopdb_dir}/mimeinfo.cache
@ -32,7 +30,7 @@ run)
fi
case "$TARGET" in
post-*)
if [ -x ${desktopdb_bin} ]; then
if [ -x ${desktopdb_bin} -a -d $desktopdb_dir ]; then
echo "Updating MIME database..."
${desktopdb_bin} ${desktopdb_dir}
fi

View file

@ -1,6 +1,6 @@
# Template file for 'xbps-triggers'
pkgname=xbps-triggers
version=0.67
version=0.68
revision=1
short_desc="The XBPS triggers for Void Linux"
maintainer="Juan RP <xtraeme@gmail.com>"