[racket] users Digest, Vol 61, Issue 13

From: Eli Barzilay (eli at barzilay.org)
Date: Sun Sep 5 07:01:11 EDT 2010

On Sep  4, Todd O'Bryan wrote:
> 
> After the script finishes,
> 
> $ gksudo gedit /etc/environment
> 
> and add /opt/plt/bin to the PATH variable defined there. Separate it
> from the other paths with a colon.
> 
> When you log out and log back in, you should be able to type
> drracket or any other plt command in a terminal and have it
> work. [...]

Note that a better solution for this (which the sh-installer can do)
is to drop symlinks to the Racket executables in some central place
like "/usr/bin" -- which will make everything work without editing
"/etc/environment" file.

More notes on your script:

* You can run "sh the-installer-file.sh" instead of chmodding it.

* The installer script is simple enough that you can pipe the expected
  responses into it, instead of using expect.  But if you're already
  using expect, you might as well check the text of the prompts so it
  won't break if our installer asks a new question.

* You're intentionally using a name with a version number -- which
  might not always be a good idea.  (Our installers use a versioned
  name only for the nightly builds for a reason...)  Specifically,
  you're always creating an "/opt/plt" symlink to the directory that
  was just installed -- which means that installing a stable release
  and then a nightly build leaves this pointing at the nightly build.

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!


Posted on the users mailing list.