fontconfig/findfonts

9 lines
262 B
Bash
Executable File

#!/bin/sh
dirs="/usr/share/fonts /usr/X11R6/lib/X11/fonts"
for d in $dirs; do
find $d \( -name '*.[Tt][Tt][Ff]' -o -name '*.[Pp][Ff][BbAa]' \) -print
done | while read f; do
dir=`dirname $f`
echo $dir
done | sort -u | sed 's/^/ <dir>/' | sed 's;$;</dir>;'