diff --git a/pkgs/tools/graphics/gnuplot/set-gdfontpath-from-fontconfig.sh b/pkgs/tools/graphics/gnuplot/set-gdfontpath-from-fontconfig.sh index 4886b4f2b7c0..92ad2e97b5b4 100644 --- a/pkgs/tools/graphics/gnuplot/set-gdfontpath-from-fontconfig.sh +++ b/pkgs/tools/graphics/gnuplot/set-gdfontpath-from-fontconfig.sh @@ -1,4 +1,4 @@ -p=( $(for n in $(fc-list | sed -r -e 's|^([^:]+):.*$|\1|'); do echo $(dirname "$n"); done | sort | uniq) ) +p=( $(fc-list : file | sed "s@/[^/]*: @@" | sort -u) ) IFS=: export GDFONTPATH="${GDFONTPATH}${GDFONTPATH:+:}${p[*]}" unset IFS p