0
0
mirror of https://github.com/termux/termux-packages.git synced 2024-11-23 13:46:16 +00:00
termux-packages/x11-packages/xorg-mkfontscale/postinst
2022-04-18 14:50:30 +05:30

19 lines
514 B
Bash
Executable File

#!@TERMUX_PREFIX@/bin/sh
set -e
PREFIX="@TERMUX_PREFIX@"
if [ -d "${PREFIX}/share/fonts" ]; then
for dir in $(find "${PREFIX}/share/fonts" -mindepth 1 -type d -printf '%p/\n'); do
[ ! -d "${dir}" ] && continue
mkfontscale "${dir}"
mkfontdir "${dir}"
find "${dir}"fonts.scale -maxdepth 0 -size -3c -delete
find "${dir}"fonts.dir -maxdepth 0 -size -3c -delete
rmdir --ignore-fail-on-non-empty "${dir}"
done
fi
if [ "${1}" = "triggered" ]; then
exit 0
fi