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

Re: texlive2007 and otfinst.py



Frank Küster <frank@debian.org> wrote:

>> The idea was that if we have a updmap.d/language.d directory, it's safe
>> to use, otherwise the setup is not appropriate and the user needs to do
>> it before using update-fontlang in user-specific mode.
>
> But that would mean that a default setup is not appropriate.  If you
> install texlive and don't change the configuration, there's only one
> directory in texmfconfig, but it doesn't exist.
>
> So I guess we should test whether there's more than one, and if yes (and
> none does exist) give a nice error message.

I suggest

--- scripts/update-fontlang	(Revision 2961)
+++ scripts/update-fontlang	(Arbeitskopie)
@@ -468,14 +468,27 @@
     texmfconfig=$(kpsewhich --expand-path '$TEXMFCONFIG')
     OLDIFS="$IFS"
     IFS=:
+    count=0
     for d in "$texmfconfig"; do
+        : $((count++))
+        : ${cnfdir:=$d}
         if [ -d "$d/$CNFDIR" ]; then
             conf_dir="$d/$CNFDIR"
             break
         fi
     done
     IFS="$OLDIFS"
+    # still empty?  Pick one
+    if [ -z "$defaultuserdir" ] && [ $count -eq 1 ]; then
+      defaultuserdir="$cnfdir/updmap.d"
+    else
+      echo "TEXMFCONFIG contains more than one directory, and none of them"
+      echo "already contains a updmap.d/ subdirectory."
+      echo "I don't know how to proceed here, stopping."
+      exit 1
+    fi

 Regards, Frank

-- 
Frank Küster
Single Molecule Spectroscopy, Protein Folding @ Inst. f. Biochemie, Univ. Zürich
Debian Developer (teTeX/TeXLive)



Reply to: