#!/bin/sh
#
# wrapper script to update font caches

for dir in $(find /usr/share/fonts -maxdepth 1 -type d \( ! -path /usr/share/fonts \)); do
	rm -f $dir/fonts.scale $dir/fonts.dir $dir/.uuid
	rmdir --ignore-fail-on-non-empty $dir
	[ -d "$dir" ] || continue
	mkfontdir $dir
	mkfontscale $dir
done
