1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-19 03:52:17 +00:00
freebsd-ports/Keywords/fontsdir.ucl
Alex Kozlov 6107ede2ac - Accept absolute path for @fc, @fontsdir, @fcfontsdir, @shell keywords
Approved by:	portmgr (antoine, bapt)
Differential Revision:	https://reviews.freebsd.org/D721
2014-10-08 21:39:47 +00:00

28 lines
706 B
Plaintext

# $FreeBSD$
#
# MAINTAINER: x11@FreeBSD.org
actions: [dir]
post-install: <<EOD
case "%@" in
/*) fontsdir="%@" ;;
*) fontsdir="%D/%@" ;;
esac
mkfontscale ${fontsdir} 2>/dev/null || true
mkfontdir ${fontsdir} 2>/dev/null || true
EOD
post-deinstall: <<EOD
case "%@" in
/*) fontsdir="%@" ;;
*) fontsdir="%D/%@" ;;
esac
mkfontscale ${fontsdir} 2>/dev/null || true
if [ -e ${fontsdir}/fonts.scale -a "`stat -f '%%z' ${fontsdir}/fonts.scale 2>/dev/null`" = '2' ]; then
rm ${fontsdir}/fonts.scale
fi
mkfontdir ${fontsdir} 2>/dev/null || true
if [ -e ${fontsdir}/fonts.dir -a "`stat -f '%%z' ${fontsdir}/fonts.dir 2>/dev/null`" = '2' ]; then
rm ${fontsdir}/fonts.dir
fi
EOD