This approach creates all ${LOCALBASE} and ${X11BASE} desktop directories before updating the desktop database to ensure the mimeinfo.cache files are created when this package is installed. Upon package deinstallation, each desktop directory will be rmdir'd.
17 lines
247 B
Bash
17 lines
247 B
Bash
#!/bin/sh
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
# Initialize the desktop directories and MIME cache.
|
|
|
|
if [ "$2" != "POST-INSTALL" ]; then
|
|
exit 0
|
|
fi
|
|
|
|
for pmdir in %%PORT_MIMEDIRS%%; do
|
|
mkdir -p ${pmdir}
|
|
done
|
|
|
|
${PKG_PREFIX}/bin/update-desktop-database -q
|
|
|
|
exit 0
|