[NTG-context] updating context on Ubuntu 6.06

Hans Hagen pragma at wxs.nl
Thu Jul 27 10:04:41 CEST 2006


Sanjoy Mahajan wrote:
>
>          def locatedlocaltree
> -            return `kpsewhich --expand-var $TEXMFLOCAL`.chomp rescue nil
> +            return `kpsewhich --expand-var '$TEXMFLOCAL'`.chomp rescue nil
>          end
>   
returns 'result' here

can you try:

        def locatedlocaltree
            tree = `kpsewhich --expand-path $TEXMFLOCAL`.chomp rescue nil
            unless tree && FileTest.directory?(tree) then
                tree = `kpsewhich --expand-path $TEXMF`.chomp rescue nil
            end
            return tree
        end

(uses expand-path instead)

Hans

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------



More information about the ntg-context mailing list