[racket] users Digest, Vol 61, Issue 13

From: Todd O'Bryan (toddobryan at gmail.com)
Date: Mon Sep 6 09:20:20 EDT 2010

On Sun, Sep 5, 2010 at 7:01 AM, Eli Barzilay <eli at barzilay.org> wrote:
> 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.
>
I purposely avoid changing things in /usr, but that's just a personal
preference. When I upgrade, I make copies of /opt and /etc and know
that anything not in there I can leave to the package management
system.

> More notes on your script:
>
> * You can run "sh the-installer-file.sh" instead of chmodding it.
>
Good point!

> * 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.
>
Yeah. I tried this originally and had trouble. That's why it currently
just checks for "> ". I'll see about updating if it causes problems.

> * 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.
>
Another good point. I guess the take-home message is to make sure that
/opt/plt points to the version you want to use on a regular basis and
use the full path for any other versions you might want installed as
well.

Thanks for taking the time to look at it. Now I wish I just knew
enough to make a proper .deb package. :-/

Todd


Posted on the users mailing list.