From b4da691f2a4ad1620e79d2959197595797ef8645 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Mon, 13 Feb 2012 12:11:53 -0500 Subject: [PATCH] Only modify GDFONTPATH if /usr/share/fonts/ exists in .bashrc.d/05local_paths. For example, my university's SunOS 5.10 machine doesn't have this directory. --- src/.bashrc.d/05local_paths | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/.bashrc.d/05local_paths b/src/.bashrc.d/05local_paths index f08ec32..2452b9e 100644 --- a/src/.bashrc.d/05local_paths +++ b/src/.bashrc.d/05local_paths @@ -10,12 +10,14 @@ export MANPATH="$MANPATH:$HOME/.local/share/man" export TEXINPUTS=":.:$HOME/.local/share/texmf/" # personalize font path (Gnuplot uses gd to find fancy fonts) -GDFONTPATH=""; -for x in $(find /usr/share/fonts/ -type d); do - GDFONTPATH="$GDFONTPATH:$x"; -done; -GDFONTPATH="${GDFONTPATH:1}"; -export GDFONTPATH +if [ -d /usr/share/fonts/ ]; then + GDFONTPATH=""; + for x in $(find /usr/share/fonts/ -type d); do + GDFONTPATH="$GDFONTPATH:$x"; + done; + GDFONTPATH="${GDFONTPATH:1}"; + export GDFONTPATH +fi # personalize python path # -- 2.26.2