Only modify GDFONTPATH if /usr/share/fonts/ exists in .bashrc.d/05local_paths.
authorW. Trevor King <wking@drexel.edu>
Mon, 13 Feb 2012 17:11:53 +0000 (12:11 -0500)
committerW. Trevor King <wking@drexel.edu>
Mon, 13 Feb 2012 17:11:53 +0000 (12:11 -0500)
For example, my university's SunOS 5.10 machine doesn't have this
directory.

src/.bashrc.d/05local_paths

index f08ec322ff041a1dc604d9fb3d94d1a56fd622cc..2452b9e44c6c299f15c1ef6fd717fcbf56499b03 100644 (file)
@@ -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
 #