Re: updmap problem (not only) on cygwin

Jan Nieuwenhuizen <[email protected]>
Newsgroups gmane.comp.tex.tetex.general
Organization Jan at Appel
Message-ID <[email protected]>
Bertalan Fodor writes:

> in cygwin environment the home directory is often
> /cygdrive/c/Documents and Settings/myname.
> This causes a problem in updmap, because $cnfFile is not written
> always as $cnfFile. Maybe $shortCnfFile also.
> In listmaps() and listavailablemaps() it is not written like that.

How's this patch?

Jan.

--- texk/tetex/ChangeLog.orig	2005-03-10 15:03:01 +0100
+++ texk/tetex/ChangeLog	2005-03-10 15:02:49 +0100
@@ -1,3 +1,7 @@
+2005-03-10  Jan Nieuwenhuizen  <[email protected]>
+
+	* updmap: Bugfix: quote $cnfFile and $cnfFileShort.
+
 Sat Dec 18 14:19:43 CET 1999 te
 	* added manpages for epstopdf and dvi2fax (contributed by "James
 	R. Van Zandt" <[email protected]>)
--- texk/tetex/updmap.orig	2005-03-10 14:58:50 +0100
+++ texk/tetex/updmap	2005-03-10 15:00:58 +0100
@@ -860,7 +860,7 @@
 setupCfgFile()
 {
   case "$cnfFile" in
-    "") cnfFile=`locateWeb2c $cnfFileShort`
+    "") cnfFile=`locateWeb2c "$cnfFileShort"`
         case "$cnfFile" in
           "") abort "config file $cnfFileShort not found"
         esac;;
@@ -1002,7 +1002,7 @@
 ###############################################################################
 listMaps()
 {
-  egrep '^(#! *)?(Mixed)?Map' $cnfFile
+  egrep '^(#! *)?(Mixed)?Map' "$cnfFile"
 }
 
 ###############################################################################
@@ -1017,7 +1017,7 @@
   OLDIFS=$IFS
   IFS='
 '
-  for line in `egrep '^(#! *)?(Mixed)?Map' $cnfFile`; do
+  for line in `egrep '^(#! *)?(Mixed)?Map' "$cnfFile"`; do
     m=`echo "$line" | sed 's@[ 	]*$@@; s@.*[ 	]@@'`
     kpsewhich --format=map "$m" >/dev/null && echo "$line"
   done
@@ -1312,7 +1312,7 @@
 
   if test -n "$cfgmaint"; then
     if test -z "$cfgparam"; then
-      co=`$TEXMFMAIN/texconfig/tcfmgr --tmp $tmpdir --cmd co --file $cnfFileShort`
+      co=`$TEXMFMAIN/texconfig/tcfmgr --tmp $tmpdir --cmd co --file "$cnfFileShort"`
       test $? = 0 || cleanup
       set x $co; shift
       id=$1; cnfFile=$3; orig=$4
@@ -1324,7 +1324,7 @@
 
     case "$cmd" in
       edit)
-        ${VISUAL-${EDITOR-vi}} $cnfFile;;
+        ${VISUAL-${EDITOR-vi}} "$cnfFile";;
       setoption)
         setOption "$setoptionOpt" "$setoptionVal";;
       enable)

-- 
Jan Nieuwenhuizen <[email protected]> | GNU LilyPond - The music typesetter
http://www.xs4all.nl/~jantien       | http://www.lilypond.org
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.