xbps-triggers: update-desktopdb: do not run it if required dir is unavailable.
This commit is contained in:
parent
a99b3ebf5a
commit
7f1f3c7166
2 changed files with 3 additions and 5 deletions
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/sh -e
|
#!/bin/sh
|
||||||
#
|
#
|
||||||
# Updates the MIME database that connects with applications, through
|
# Updates the MIME database that connects with applications, through
|
||||||
# the update-desktop-database(1) utility.
|
# the update-desktop-database(1) utility.
|
||||||
|
@ -15,8 +15,6 @@ PKGNAME="$3"
|
||||||
VERSION="$4"
|
VERSION="$4"
|
||||||
UPDATE="$5"
|
UPDATE="$5"
|
||||||
|
|
||||||
export PATH="$PATH:/usr/local/bin"
|
|
||||||
|
|
||||||
desktopdb_bin=usr/bin/update-desktop-database
|
desktopdb_bin=usr/bin/update-desktop-database
|
||||||
desktopdb_dir=usr/share/applications
|
desktopdb_dir=usr/share/applications
|
||||||
desktopdb_cache=${desktopdb_dir}/mimeinfo.cache
|
desktopdb_cache=${desktopdb_dir}/mimeinfo.cache
|
||||||
|
@ -32,7 +30,7 @@ run)
|
||||||
fi
|
fi
|
||||||
case "$TARGET" in
|
case "$TARGET" in
|
||||||
post-*)
|
post-*)
|
||||||
if [ -x ${desktopdb_bin} ]; then
|
if [ -x ${desktopdb_bin} -a -d $desktopdb_dir ]; then
|
||||||
echo "Updating MIME database..."
|
echo "Updating MIME database..."
|
||||||
${desktopdb_bin} ${desktopdb_dir}
|
${desktopdb_bin} ${desktopdb_dir}
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# Template file for 'xbps-triggers'
|
# Template file for 'xbps-triggers'
|
||||||
pkgname=xbps-triggers
|
pkgname=xbps-triggers
|
||||||
version=0.67
|
version=0.68
|
||||||
revision=1
|
revision=1
|
||||||
short_desc="The XBPS triggers for Void Linux"
|
short_desc="The XBPS triggers for Void Linux"
|
||||||
maintainer="Juan RP <xtraeme@gmail.com>"
|
maintainer="Juan RP <xtraeme@gmail.com>"
|
||||||
|
|
Loading…
Reference in a new issue