972c516b45
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.
21 lines
314 B
Bash
21 lines
314 B
Bash
#!/bin/sh
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
# Remove leftover mimeinfo.cache files.
|
|
|
|
if [ "$2" != "POST-DEINSTALL" ]; then
|
|
exit 0
|
|
fi
|
|
|
|
for mdir in %%MIMEDIRS%%; do
|
|
if [ -f ${mdir}/mimeinfo.cache ]; then
|
|
rm -f ${mdir}/mimeinfo.cache
|
|
fi
|
|
done
|
|
|
|
for pmdir in %%PORT_MIMEDIRS%%; do
|
|
rmdir ${pmdir} 2>/dev/null
|
|
done
|
|
|
|
exit 0
|