ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Sanjoy Mahajan <sanjoy@mrao.cam.ac.uk>
Subject: Re: updating context on Ubuntu 6.06
Date: Thu, 27 Jul 2006 13:37:11 +0100	[thread overview]
Message-ID: <E1G6571-0003su-00@skye.ra.phy.cam.ac.uk> (raw)
In-Reply-To: Your message of "Thu, 27 Jul 2006 10:04:41 +0200." <44C87399.1050805@wxs.nl>

> > It was hard to find a machine not running bash, a measure of the
> > success of free software.  But I eventually found a nearby Solaris
> >   
> more a measure of the lack of diversity ... imagine everyone living a 
> house of the same design, driving the same car, etc etc

Or instead walking, cycling, or taking public transit...but I dream.

> can you try: ...

I ran this ruby script (on Linux):

  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

  print locatedlocaltree+"\n"

and got the error due to lack of quotes around $TEXMF{,LOCAL}:

  kpsewhich: option `--expand-path' requires an argument
  kpsewhich: option `--expand-path' requires an argument

Unix definitely needs those quotes to protect the variables in the
backquoted command from the shell.

Also the 'rescue nil' doesn't seem to have any effect.  Probably
similar to system(), the `cmd` construct doesn't raise an exception if
the command fails or even isn't found.  Instead you get tree equal to
the empty string, since `` captures (the empty) stdout.

Is path expansion (instead of variable expansion) a risky change?  It
might make tree a colon-separated list.  That will cause trouble for
the directory test in the 'unless' clause, and also break later uses
of the returned value of locatedlocaltree that assume it is one path
element.

-Sanjoy

`Never underestimate the evil of which men of power are capable.'
         --Bertrand Russell, _War Crimes in Vietnam_, chapter 1.

  reply	other threads:[~2006-07-27 12:37 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-24 20:24 Sanjoy Mahajan
2006-07-26  8:36 ` Ralf Schmitt
2006-07-26  9:36   ` Taco Hoekwater
2006-07-26 10:36     ` Jano Kula
2006-07-26 11:20     ` Ralf Schmitt
2006-07-26 15:17     ` Sanjoy Mahajan
2006-07-26 16:13       ` Taco Hoekwater
2006-07-26 19:47         ` Sanjoy Mahajan
2006-07-26 20:34           ` Taco Hoekwater
2006-07-26 20:57           ` Hans Hagen
2006-07-26 21:01           ` Hans Hagen
2006-07-26 21:29             ` Switching Font Size in a Natural Table Neal Lester
2006-08-01 23:31               ` Mojca Miklavec
2006-07-26 22:10             ` updating context on Ubuntu 6.06 Sanjoy Mahajan
2006-07-27  8:05               ` Hans Hagen
2006-07-27  8:46                 ` Taco Hoekwater
2006-07-27  8:04           ` Hans Hagen
2006-07-27 12:37             ` Sanjoy Mahajan [this message]
2006-07-26 21:02         ` Hans Hagen
2006-07-26 14:43   ` Sanjoy Mahajan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1G6571-0003su-00@skye.ra.phy.cam.ac.uk \
    --to=sanjoy@mrao.cam.ac.uk \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).