From: W. Trevor King Date: Mon, 13 Feb 2012 17:11:53 +0000 (-0500) Subject: Only modify GDFONTPATH if /usr/share/fonts/ exists in .bashrc.d/05local_paths. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b4da691f2a4ad1620e79d2959197595797ef8645;p=dotfiles-public.git 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. --- 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 #