[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Relative paths in update-fonts-dir



Greetings,

The version of  update-fonts-dir  in Testing doesn't handle relative 
path names.  In particular,  "update-fonts-dir ."  silently does 
nothing, because  /usr/lib/X11/fonts/.  exists and is a directory, 
but has no fonts to add.  The attached patch addresses this (although 
perhaps not optimally).

Cheers,
Lachlan
-- 
lha@users.sourceforge.net
ht://Dig developer DownUnder  (http://www.htdig.org)
--- /usr/sbin/update-fonts-dir	2004-03-18 16:40:36.000000000 +1100
+++ update-fonts-dir	2004-05-16 14:56:39.000000000 +1000
@@ -39,6 +39,9 @@
     else
       warn "absolute path $XDIR was provided"
     fi
+  elif expr "$1" : "\..*" > /dev/null 2>&1; then
+    # relative path (".", "..", "../foo") to X font directory was provided
+    XDIR=`( cd $1 ; pwd )`
   else
     # assume they just gave us the basename
     XDIR=/usr/lib/X11/fonts/$1

Reply to: